vim.keymap.set("i", "<tab>", function()
local cmp = require("cmp")
if cmp.visible() then
cmp.confirm()
else
return '\\<tab>'
end
end, { desc = "Confirm", expr = true, noremap = true })
What to return or what command to run in else block to get default behavior?
Try to use /t
Please reply if any issue after changing this code.
Thanks