This commit is contained in:
antoine 2026-03-22 09:48:53 +01:00
commit 6eae514dab
Signed by: antoine
GPG key ID: 9EB6BAADC51B6133
15 changed files with 500 additions and 0 deletions

29
plugins/completion.nix Normal file
View file

@ -0,0 +1,29 @@
{...}: {
vim = {
autocomplete.nvim-cmp = {
enable = true;
mappings = {
complete = "<C-Space>";
close = "<C-e>";
scrollDocsUp = "<C-b>";
scrollDocsDown = "<C-f>";
confirm = "<CR>";
next = "<C-j>";
previous = "<C-k>";
};
};
snippets.luasnip.enable = true;
luaConfigRC.luasnip-keymaps = ''
vim.keymap.set({"i", "s"}, "<C-l>", function()
local ls = require("luasnip")
if ls.expand_or_jumpable() then ls.expand_or_jump() end
end, {silent = true})
vim.keymap.set({"i", "s"}, "<C-h>", function()
local ls = require("luasnip")
if ls.jumpable(-1) then ls.jump(-1) end
end, {silent = true})
'';
};
}