Test cmp autocomplete changes

This commit is contained in:
iFargle 2024-02-13 11:54:56 +09:00
parent 3dfda48e39
commit 72beb1f583

View file

@ -44,11 +44,10 @@
# Normal Mode # Normal Mode
# NVimTree # NVimTree
(nmap "<leader>n" "<Nop>" // desc "[N]vimTree" // silent) (nmap "<leader>n" "<Nop>" // desc "[N]vimTree" // silent)
(nmap "<leader>nf" ":NvimTreeFocus<CR>"// desc "[F]ocus NvimTree") (nmap "<leader>nf" ":NvimTreeFocus<CR>" // desc "[F]ocus NvimTree")
(nmap "<leader>nt" ":NvimTreeToggle<CR>" // desc "[T]oggle NvimTree") (nmap "<leader>nt" ":NvimTreeToggle<CR>" // desc "[T]oggle NvimTree")
(nmap "<leader>ns" ":NvimTreeToggle<CR>" // desc "[S]earch NvimTree") (nmap "<leader>ns" ":NvimTreeFindFile<CR>" // desc "[S]earch NvimTree")
(nmap "<leader>nc" ":NvimTreeClose<CR>" // desc "[C]lose NvimTree") (nmap "<leader>nc" ":NvimTreeClose<CR>" // desc "[C]lose NvimTree")
# ToggleTerm # ToggleTerm
(nmap "<leader>t" "<Nop>" // desc "[T]oggleTerm" // silent) (nmap "<leader>t" "<Nop>" // desc "[T]oggleTerm" // silent)
(nmap "<leader>tt" ":ToggleTerm<CR>" // desc "[T]oggle Terminal") (nmap "<leader>tt" ":ToggleTerm<CR>" // desc "[T]oggle Terminal")
@ -146,6 +145,27 @@
nvim-cmp = { nvim-cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
mapping = {
"<CR>" = "cmp.mapping.autocomplete()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-e>" = "cmp.mapping.close()";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-Tab>" = {
action = "cmp.mapping.select_prev_item()";
modes = [
"i"
"s"
];
};
"<Tab>" = {
action = "cmp.mapping.select_next_item()";
modes = [
"i"
"s"
];
};
};
sources = [ sources = [
{ name = "nvim_lua"; } { name = "nvim_lua"; }
{ name = "nvim_lsp"; } { name = "nvim_lsp"; }