flake/nixos/nvim/plugins/cmp.nix

34 lines
921 B
Nix
Raw Normal View History

2025-02-02 18:53:01 -06:00
{
programs.nixvim = {
plugins = {
cmp = {
enable = true;
2025-02-02 19:02:46 -06:00
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)";
2025-02-04 08:26:49 -06:00
"<CR>" = "cmp.mapping.confirm({ select = false })";
2025-02-02 19:02:46 -06:00
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
};
};
2025-02-02 18:53:01 -06:00
};
2025-02-06 23:23:02 -06:00
copilot-lua = {
enable = true;
settings = {
suggestion.enabled = false;
panel.enabled = false;
};
};
2025-02-02 18:53:01 -06:00
copilot-cmp.enable = true;
};
};
}