[Neotab] Add, update CMP mapping to be compatible

This commit is contained in:
2025-10-16 10:33:30 +02:00
parent c22375d267
commit 535941227a
2 changed files with 9 additions and 4 deletions

View File

@@ -56,12 +56,10 @@ return {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })
elseif require("luasnip").expandable() then
-- Expands snippet if possible
require("luasnip").expand()
else
-- Otherwise, fallback (insert a tab character)
fallback()
require("neotab").tabout()
-- fallback()
end
end, { "i", "s" }),

View File

@@ -0,0 +1,7 @@
return {
"kawre/neotab.nvim",
event = "InsertEnter",
opts = {
tabkey = "",
},
}