separate config into files

This commit is contained in:
2025-03-18 11:45:00 -05:00
parent 469864dd50
commit 594ead9898
6 changed files with 428 additions and 400 deletions

43
config/cmp.nix Normal file
View File

@@ -0,0 +1,43 @@
{ ... }: {
plugins = {
cmp-nvim-lsp.enable = true;
cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "luasnip"; }
# { name = "cmdline"; }
];
completion = {
completeopt = "menu,menuone,noinsert";
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<C-y>" = "cmp.mapping.confirm({ select = true })";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()";
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
};
snippet.expand = ''
function(args)
require("luasnip").lsp_expand(args.body)
end
'';
};
};
};
}