init
This commit is contained in:
commit
6eae514dab
15 changed files with 500 additions and 0 deletions
29
plugins/completion.nix
Normal file
29
plugins/completion.nix
Normal 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})
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue