flake/nixos/nvim/plugins/cmp.nix

47 lines
1.2 KiB
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 = [
2025-02-08 12:53:14 -06:00
{
name = "copilot";
2025-02-09 11:03:41 -06:00
group_index = 2;
2025-02-08 12:53:14 -06:00
}
{
name = "nvim_lsp";
group_index = 2;
}
{
name = "buffer";
group_index = 2;
}
{
name = "path";
group_index = 2;
}
2025-02-02 19:02:46 -06:00
];
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;
};
};
}