From 3d0658a9945586215ade21992d7bfda903d2d4d8 Mon Sep 17 00:00:00 2001 From: Soispha Date: Sat, 19 Aug 2023 19:40:21 +0200 Subject: Fix(hm/conf/neovim/mappings): Correctly specify lua code --- .../config/neovim/nixvim/mappings/default.nix | 52 ++++++++++++---------- 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'home-manager/soispha/config/neovim/nixvim/mappings') diff --git a/home-manager/soispha/config/neovim/nixvim/mappings/default.nix b/home-manager/soispha/config/neovim/nixvim/mappings/default.nix index 575ad465..a152a17e 100644 --- a/home-manager/soispha/config/neovim/nixvim/mappings/default.nix +++ b/home-manager/soispha/config/neovim/nixvim/mappings/default.nix @@ -7,7 +7,7 @@ maps = let normal_and_insert = { "" = { - action = "'noh'"; + action = "noh"; desc = "Disable the search highlighting and send Escape"; }; }; @@ -27,6 +27,7 @@ end end ''; + lua = true; desc = "completion trigger/ forward in completen menu"; }; "" = { @@ -36,22 +37,23 @@ cmp.confirm() end ''; + lua = true; desc = "confirm the selected item"; }; } normal_and_insert; normalVisualOp = { # yank/ cut to the system clipboard - "y" = "'\"+y'"; - "Y" = "'\"+Y'"; + "y" = "\"+y"; + "Y" = "\"+Y"; # Unmap some old keys #"s" = "''"; #"t" = "''"; - "" = "''"; - "" = "''"; - "" = "''"; - "" = "''"; + "" = ""; + "" = ""; + "" = ""; + "" = ""; # remap dvorak "l" = "n"; @@ -74,48 +76,49 @@ normal = lib.recursiveUpdate { "" = { - action = "':'"; + action = ":"; desc = "jump to command line"; }; "\\f" = { action = "require('lf').start()"; + lua = true; desc = "open lf in a floating window"; }; # Splits "" = { - action = "'p'"; + action = "p"; desc = "go to previous split"; }; "" = { - action = "'w'"; + action = "w"; desc = "go to next split"; }; "-" = { - action = "'s'"; + action = "s"; desc = "New horizontal split"; }; "|" = { - action = "'v'"; + action = "v"; desc = "New vertical split"; }; # Exit insert mode after creating a new line above or below the current line."; - "o" = "'o'"; - "O" = "'O'"; + "o" = "o"; + "O" = "O"; # Center the cursor vertically when moving to the next word during a search. - "n" = "'nzzzv'"; - #"N" = "'Nzzzv'"; + "n" = "nzzzv"; + #"N" = "Nzzzv"; "p" = { - action = "'\"_dP'"; + action = "\"_dP"; desc = "keep the cut thing in the base register"; }; "d" = { - action = "'\"_d'"; + action = "\"_d"; desc = "delete without saving to register"; }; "dd" = { @@ -128,37 +131,38 @@ end end ''; + lua = true; desc = "Pipe all blank line deletions to the blackhole register"; expr = true; silent = true; }; "s" = { - action = "':%s/\\<\\>//gI'"; + action = ":%s/\\<\\>//gI"; desc = "replace for the word under the cursor"; }; "" = { - action = "'mksession! '"; + action = "mksession! "; desc = "to overwrite/create a session"; }; "X" = { - action = "'[[!!$SHELL ]]'"; + action = "[[!!$SHELL ]]"; desc = "Read the current line and execute that line in your $SHELL. The resulting output will replace the curent line that was being executed."; }; } normal_and_insert; terminal = { "" = { - action = "''"; + action = ""; desc = "Exit terminal mode with "; }; }; visual = { # move selected lines in visual mode - "T" = "':m '>+1gv=gv'"; - "N" = "':m '<-2gv=gv'"; + "T" = ":m '>+1gv=gv"; + "N" = ":m '<-2gv=gv"; }; }; }; -- cgit 1.4.1