cmp: finally fix the annoying tab jump issue
This commit is contained in:
parent
38e3c66ab2
commit
b47ef5fbe0
|
@ -6,10 +6,6 @@ require "config.neovide"
|
|||
|
||||
vim.keymap.set("t", "<c-d>", "<C-\\><C-n>", { silent = true, desc = "Exit Terminal Mode" })
|
||||
|
||||
-- LazyVim hardcode tabs to jump snippet completions. Very fucking annoying.
|
||||
vim.keymap.del({ "i" }, "<tab>")
|
||||
vim.keymap.del({ "i" }, "<s-tab>")
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>z",
|
||||
|
|
|
@ -1,7 +1,42 @@
|
|||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
opts = function(_, opts)
|
||||
require "snippets"
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-cmp",
|
||||
keys = {
|
||||
{
|
||||
"<tab>",
|
||||
false,
|
||||
mode = "i",
|
||||
},
|
||||
{
|
||||
"<c-j>",
|
||||
function()
|
||||
return require("luasnip").jumpable(1) and "<Plug>luasnip-jump-next" or "<c-j>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
{
|
||||
"<c-k>",
|
||||
function()
|
||||
return require("luasnip").jumpable(-1) and "<Plug>luasnip-jump-prev" or "<c-k>"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = "i",
|
||||
},
|
||||
{
|
||||
"<s-tab>",
|
||||
false,
|
||||
mode = { "i" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue