This commit is contained in:
meml0rz
2024-11-13 00:31:19 +01:00
parent cb52c14c06
commit f9765b9a21

View File

@ -16,110 +16,111 @@ let
in in
{ {
programs.nixvim.plugins = { programs.nixvim.plugins = {
cmp = { cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
settings = { settings = {
mapping = { mapping = {
"<C-d>" = "cmp.mapping.scroll_docs(-4)"; "<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)"; "<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()"; "<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()"; "<C-e>" = "cmp.mapping.close()";
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})"; "<Tab>" = "cmp.mapping(cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})";
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})"; "<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select}), {'i', 's'})";
"<CR>" = "cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace })"; "<CR>" = "cmp.mapping.confirm({ select = false, behavior = cmp.ConfirmBehavior.Replace })";
};
preselect = "cmp.PreselectMode.None";
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
sources = [
{
name = "nvim_lsp";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "nvim_lsp_signature_help";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "nvim_lsp_document_symbol";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "treesitter";
priority = 850;
option = {
inherit get_bufnrs;
}; };
}
{ preselect = "cmp.PreselectMode.None";
name = "luasnip";
priority = 750; snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
}
{ sources = [
name = "buffer"; {
priority = 500; name = "nvim_lsp";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "nvim_lsp_signature_help";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "nvim_lsp_document_symbol";
priority = 1000;
option = {
inherit get_bufnrs;
};
}
{
name = "treesitter";
priority = 850;
option = { option = {
inherit get_bufnrs; inherit get_bufnrs;
}; };
} }
{ {
name = "path"; name = "luasnip";
priority = 300; priority = 750;
} }
{ {
name = "cmdline"; name = "buffer";
priority = 300; priority = 500;
} option = {
{ inherit get_bufnrs;
name = "git"; };
priority = 250; }
} {
{ name = "path";
name = "calc"; priority = 300;
priority = 150; }
} {
{ name = "cmdline";
name = "emoji"; priority = 300;
priority = 100; }
} {
]; name = "git";
priority = 250;
}
{
name = "calc";
priority = 150;
}
{
name = "emoji";
priority = 100;
}
];
};
}; };
};
friendly-snippets.enable = true; friendly-snippets.enable = true;
luasnip.enable = true; luasnip.enable = true;
lspkind = { lspkind = {
enable = true;
cmp = {
enable = true; enable = true;
menu = { cmp = {
buffer = ""; enable = true;
calc = ""; menu = {
cmdline = ""; buffer = "";
codeium = "󱜙"; calc = "";
emoji = "󰞅"; cmdline = "";
git = ""; codeium = "󱜙";
luasnip = "󰩫"; emoji = "󰞅";
neorg = ""; git = "";
nvim_lsp = ""; luasnip = "󰩫";
nvim_lua = ""; neorg = "";
path = ""; nvim_lsp = "";
spell = ""; nvim_lua = "";
treesitter = "󰔱"; path = "";
spell = "";
treesitter = "󰔱";
};
}; };
}; };
}; };