add keymaps to nvim-cmp
This commit is contained in:
parent
e57b9c080b
commit
178c7f94bf
1 changed files with 8 additions and 0 deletions
|
|
@ -3,13 +3,21 @@
|
|||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
# LSP source
|
||||
{ name = "nvim_lsp"; }
|
||||
# For path completion
|
||||
{ name = "path"; }
|
||||
# For buffer completion
|
||||
{ name = "buffer"; }
|
||||
# For command line completion
|
||||
{ name = "cmdline"; }
|
||||
];
|
||||
mapping = {
|
||||
# <CR> means enter
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<Tab>" = "cmp.mapping.select_next_item()";
|
||||
"<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue