Added nixvim

This commit is contained in:
2025-04-10 11:26:13 +02:00
parent 5b6f8916f8
commit a82e6c87e0
16 changed files with 478 additions and 30 deletions

26
home/nvim/cmp.nix Normal file
View File

@@ -0,0 +1,26 @@
{ ... }:
{
programs.nixvim.plugins.lspkind.enable = true;
programs.nixvim.plugins.cmp-nvim-lsp-signature-help.enable = true;
programs.nixvim.plugins.cmp = {
enable = true;
autoEnableSources = true;
settings = {
sources = [
{ name = "nvim_lsp"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "path"; }
{ name = "buffer"; }
];
mapping = {
"<Tab>" = "cmp.mapping.select_next_item()";
"<S-Tab>" = "cmp.mapping.select_prev_item()";
"<C-j>" = "cmp.mapping.scroll_docs(4)";
"<C-k>" = "cmp.mapping.scroll_docs(-4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-Esc>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
};
};
};
}