Adjust cmp settings

This commit is contained in:
Vili Sinervä 2024-12-20 01:45:45 +02:00
parent 039721c1a0
commit 13e7078dde
No known key found for this signature in database
GPG key ID: DF8FEAF54EFAC996

View file

@ -118,12 +118,24 @@ in
cmp = { cmp = {
enable = true; enable = true;
settings.sources = [ settings = {
sources = [
{ name = "nvim-lsp"; } { name = "nvim-lsp"; }
{ name = "buffer"; }
{ name = "vim-lsp-signature-help"; } { name = "vim-lsp-signature-help"; }
{ name = "vim-vsnip"; } { name = "vim-vsnip"; }
{ name = "treesitter"; } { name = "treesitter"; }
]; ];
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'})";
};
};
}; };
friendly-snippets.enable = true; friendly-snippets.enable = true;
nvim-autopairs.enable = true; nvim-autopairs.enable = true;