summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2024-09-25 19:22:07 +0200
committerMinijackson <minijackson@riseup.net>2024-09-25 19:23:19 +0200
commit42490fbef58a4427741c5966dbf835fb5f7c9faf (patch)
tree64107cccc78e7466a31687c5f9b2c52e6c2b2ca1
parent8881adf944cea699274ba30e79863730663635c7 (diff)
downloadnixos-config-reborn-42490fbef58a4427741c5966dbf835fb5f7c9faf.tar.gz
nixos-config-reborn-42490fbef58a4427741c5966dbf835fb5f7c9faf.zip
common/nixvim: add leap plugin
-rw-r--r--common/nixvim.nix51
1 files changed, 47 insertions, 4 deletions
diff --git a/common/nixvim.nix b/common/nixvim.nix
index 7dccfab..b74e6d4 100644
--- a/common/nixvim.nix
+++ b/common/nixvim.nix
@@ -200,6 +200,47 @@ in
200 }; 200 };
201 } 201 }
202 202
203 # Leap
204
205 {
206 key = "<Space>";
207 mode = ["n" "x" "o"];
208 action = "<Plug>(leap-forward)";
209 options.desc = "Leap forward to";
210 }
211
212 {
213 key = "<C-Space>";
214 mode = ["n" "x" "o"];
215 action = "<Plug>(leap-backward)";
216 options.desc = "Leap backward to";
217 }
218
219 {
220 key = "g<Space>";
221 mode = ["n" "x" "o"];
222 action = "<Plug>(leap-from-window)";
223 options.desc = "Leap from window";
224 }
225
226 {
227 key = "gnn";
228 mode = ["n" "x" "o"];
229 action.__raw = ''
230 function()
231 require('leap.treesitter').select()
232 end
233 '';
234 options.desc = "Start incremental selection";
235 }
236
237 {
238 key = "gnN";
239 mode = ["n" "x" "o"];
240 action = "V<cmd>lua require('leap.treesitter').select()<cr>";
241 options.desc = "Start linewise incremental selection";
242 }
243
203 # Toggle options 244 # Toggle options
204 (toggle "c" "cursorline") 245 (toggle "c" "cursorline")
205 (toggle "C" "cursorcolumn") 246 (toggle "C" "cursorcolumn")
@@ -332,6 +373,11 @@ in
332 373
333 lastplace.enable = true; 374 lastplace.enable = true;
334 375
376 leap = {
377 enable = true;
378 addDefaultMappings = false;
379 };
380
335 lualine = { 381 lualine = {
336 enable = true; 382 enable = true;
337 iconsEnabled = false; 383 iconsEnabled = false;
@@ -505,10 +551,7 @@ in
505 enable = true; 551 enable = true;
506 nixvimInjections = true; 552 nixvimInjections = true;
507 553
508 settings = { 554 settings.indent.enable = true;
509 incremental_selection.enable = true;
510 indent.enable = true;
511 };
512 }; 555 };
513 556
514 treesitter-context = { 557 treesitter-context = {