add keymaps to nvim-cmp

This commit is contained in:
Osman Faruk Bayram 2025-03-16 00:35:30 +03:00
parent e57b9c080b
commit 178c7f94bf

View file

@ -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()";
};
};
};