mirror of
https://github.com/Dichgrem/DCGOS.git
synced 2025-12-16 19:22:00 -05:00
57 lines
1.3 KiB
Nix
Executable File
57 lines
1.3 KiB
Nix
Executable File
_: {
|
|
programs.nixvim = {
|
|
plugins.cmp = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
completion = {
|
|
completeopt = "menu,menuone,noinsert";
|
|
};
|
|
|
|
mapping = {
|
|
"<C-n>" = "cmp.mapping.select_next_item()";
|
|
"<C-p>" = "cmp.mapping.select_prev_item()";
|
|
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
"<C-y>" = "cmp.mapping.confirm { select = true }";
|
|
"<C-Space>" = "cmp.mapping.complete {}";
|
|
"<C-l>" = ''
|
|
cmp.mapping(function()
|
|
if luasnip.expand_or_locally_jumpable() then
|
|
luasnip.expand_or_jump()
|
|
end
|
|
end, { 'i', 's' })
|
|
'';
|
|
"<C-h>" = ''
|
|
cmp.mapping(function()
|
|
if luasnip.locally_jumpable(-1) then
|
|
luasnip.jump(-1)
|
|
end
|
|
end, { 'i', 's' })
|
|
'';
|
|
};
|
|
|
|
snippet = {
|
|
expand = ''
|
|
function(args)
|
|
require('luasnip').lsp_expand(args.body)
|
|
end
|
|
'';
|
|
};
|
|
|
|
sources = [
|
|
{
|
|
name = "luasnip";
|
|
}
|
|
{
|
|
name = "nvim_lsp";
|
|
}
|
|
{
|
|
name = "path";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
};
|
|
}
|