Update snippet completion keybindings

This commit is contained in:
Oliver Davies 2024-02-26 15:40:12 +00:00
parent 112433a8bd
commit 743c9f92f2
2 changed files with 19 additions and 2 deletions

View file

@ -1,5 +1,11 @@
# Changelog
## 26th February 2024
### Changed
* Update keybindings for snippet completion.
## 25th February 2024
* Remove `colorcolumn` and `cursorline`.

View file

@ -18,9 +18,20 @@ cmp.setup {
},
mapping = cmp.mapping.preset.insert {
["<C-d>"] = cmp.mapping.scroll_docs(-4),
["<C-e>"] = cmp.mapping.close(),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-h>"] = cmp.mapping(function()
if luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
end
end, { "i", "s" }),
["<C-l>"] = cmp.mapping(function()
if luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
end
end, { "i", "s" }),
["<C-y>"] = cmp.mapping.confirm { select = true },
["<tab>"] = cmp.config.disable,
},