nvim: move to services we do not specify a pkgset
This commit is contained in:
parent
465a6b19d1
commit
11b98d8146
45 changed files with 38 additions and 37 deletions
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf (lib.elem "nvim::cmp" config.machine.pkgs) {
|
||||
programs.nvim-lazy.lazyPlugins = [
|
||||
# Autocompletion
|
||||
{
|
||||
dir = vPlug: vPlug.nvim-cmp;
|
||||
event = [ "InsertEnter" ];
|
||||
dependencies = (
|
||||
vPlug: with vPlug; [
|
||||
luasnip
|
||||
]
|
||||
);
|
||||
config = # lua
|
||||
''
|
||||
function()
|
||||
local cmp = require('cmp')
|
||||
|
||||
cmp.setup({
|
||||
${lib.optionalString (lib.elem "nvim::lsp" config.machine.pkgs) # lua
|
||||
''sources = { { name = 'nvim_lsp' }, },''
|
||||
}
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||
})
|
||||
})
|
||||
end
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
dir = vPlug: vPlug.luasnip;
|
||||
lazy = true;
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue