mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
fixed snippet keybindings
This commit is contained in:
parent
c9790d8223
commit
16cca276df
1 changed files with 14 additions and 16 deletions
|
|
@ -156,23 +156,21 @@ cmp.setup({
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
mapping = {
|
mapping = {
|
||||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
["<Down>"] = cmp.mapping.select_next_item(),
|
||||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
["<Up>"] = cmp.mapping.select_prev_item(),
|
||||||
-- ["<Down>"] = cmp.mapping.select_next_item(),
|
["<C-p>"] = cmp.mapping.scroll_docs(-4),
|
||||||
-- ["<Up>"] = cmp.mapping.select_prev_item(),
|
["<C-n>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
|
||||||
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
--["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
-- if cmp.visible() then
|
||||||
cmp.select_next_item()
|
-- cmp.select_next_item()
|
||||||
elseif cmp.completed then
|
-- elseif cmp.completed then
|
||||||
cmp.confirm({ select = true })
|
-- cmp.confirm({ select = true })
|
||||||
else
|
-- else
|
||||||
fallback()
|
-- fallback()
|
||||||
end
|
-- end
|
||||||
end, { "i", "s" }),
|
--end, { "i", "s" }),
|
||||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
--["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||||
|
|
||||||
["<CR>"] = cmp.mapping(function(fallback)
|
["<CR>"] = cmp.mapping(function(fallback)
|
||||||
fallback()
|
fallback()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue