add mappings for cmp

This commit is contained in:
cswimr 2025-02-02 19:02:46 -06:00
parent 3a3d4f847b
commit 3bfc56bf2a
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087

View file

@ -3,11 +3,22 @@
plugins = {
cmp = {
enable = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "buffer"; }
{ name = "path"; }
];
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "buffer"; }
{ name = "path"; }
];
mapping = {
"<C-Space>" = "cmp.mapping.complete()";
"<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>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
};
};
};
copilot-lua.enable = true;
copilot-cmp.enable = true;