added cmp
This commit is contained in:
parent
98aec6feb6
commit
01a127a380
2 changed files with 51 additions and 0 deletions
50
users/willifan/common/nixvim/cmp.nix
Normal file
50
users/willifan/common/nixvim/cmp.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ ... }:
|
||||
{
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
autoEnableSources = true;
|
||||
experimental = {ghost_text = false;};
|
||||
performance = {
|
||||
debounce = 60;
|
||||
fetchingTimeout = 200;
|
||||
maxViewEntries = 30;
|
||||
};
|
||||
snippet = {expand = "luasnip";};
|
||||
formatting = {fields = ["kind" "abbr" "menu"];};
|
||||
sources = [
|
||||
{name = "git";}
|
||||
{name = "nvim_lsp";}
|
||||
{name = "emoji";}
|
||||
{
|
||||
name = "buffer"; # text within current buffer
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{name = "copilot";}
|
||||
{
|
||||
name = "path"; # file system paths
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "luasnip"; # snippets
|
||||
keywordLength = 3;
|
||||
}
|
||||
];
|
||||
|
||||
window = {
|
||||
completion = {border = "solid";};
|
||||
documentation = {border = "solid";};
|
||||
};
|
||||
};
|
||||
};
|
||||
cmp-nvim-lsp = {enable = true;}; # lsp
|
||||
cmp-buffer = {enable = true;};
|
||||
cmp-path = {enable = true;}; # file system paths
|
||||
cmp_luasnip = {enable = true;}; # snippets
|
||||
cmp-cmdline = {enable = false;}; # autocomplete for cmdline
|
||||
};
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@
|
|||
};
|
||||
|
||||
imports = [
|
||||
./cmp.nix
|
||||
./filetype.nix
|
||||
./gitsigns.nix
|
||||
./illuminate.nix
|
||||
|
|
Loading…
Add table
Reference in a new issue