2024-06-01 17:42:25 +00:00
|
|
|
{
|
|
|
|
plugins.cmp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
mapping = {
|
|
|
|
"<C-p>" = "cmp.mapping.scroll_docs(-4)";
|
|
|
|
"<C-n>" = "cmp.mapping.scroll_docs(4)";
|
|
|
|
"<C-Space>" = "cmp.mapping.complete()";
|
|
|
|
"<C-e>" = "cmp.mapping.abort()";
|
|
|
|
# Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
|
|
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
|
|
};
|
|
|
|
|
|
|
|
snippet.expand = ''
|
|
|
|
function(args)
|
|
|
|
require('luasnip').lsp_expand(args.body)
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
{name = "buffer";}
|
|
|
|
{name = "cmdline";}
|
2024-06-03 05:02:28 +00:00
|
|
|
{name = "cmp-clippy";}
|
2024-06-01 17:42:25 +00:00
|
|
|
{name = "luasnip";}
|
|
|
|
{name = "nvim_lsp";}
|
|
|
|
{name = "path";}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
plugins.luasnip.enable = true;
|
|
|
|
}
|