diff --git a/home-manager/common/software/cli/nixvim.nix b/home-manager/common/software/cli/nixvim.nix index 1ba1752b..f6e182d8 100644 --- a/home-manager/common/software/cli/nixvim.nix +++ b/home-manager/common/software/cli/nixvim.nix @@ -42,14 +42,13 @@ # Insert Mode # Normal Mode - # NVimTree + # NVimTree (nmap "n" "" // desc "[N]vimTree" // silent) - (nmap "nf" ":NvimTreeFocus"// desc "[F]ocus NvimTree") - (nmap "nt" ":NvimTreeToggle" // desc "[T]oggle NvimTree") - (nmap "ns" ":NvimTreeToggle" // desc "[S]earch NvimTree") - (nmap "nc" ":NvimTreeClose" // desc "[C]lose NvimTree") - - # ToggleTerm + (nmap "nf" ":NvimTreeFocus" // desc "[F]ocus NvimTree") + (nmap "nt" ":NvimTreeToggle" // desc "[T]oggle NvimTree") + (nmap "ns" ":NvimTreeFindFile" // desc "[S]earch NvimTree") + (nmap "nc" ":NvimTreeClose" // desc "[C]lose NvimTree") + # ToggleTerm (nmap "t" "" // desc "[T]oggleTerm" // silent) (nmap "tt" ":ToggleTerm" // desc "[T]oggle Terminal") ]; @@ -146,6 +145,27 @@ nvim-cmp = { enable = true; autoEnableSources = true; + mapping = { + "" = "cmp.mapping.autocomplete()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.close()"; + "" = "cmp.mapping.scroll_docs(4)"; + "" = "cmp.mapping.confirm({ select = true })"; + "" = { + action = "cmp.mapping.select_prev_item()"; + modes = [ + "i" + "s" + ]; + }; + "" = { + action = "cmp.mapping.select_next_item()"; + modes = [ + "i" + "s" + ]; + }; + }; sources = [ { name = "nvim_lua"; } { name = "nvim_lsp"; }