From 535941227a4fab7783546154c591fd5fcd4eca71 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Thu, 16 Oct 2025 10:33:30 +0200 Subject: [PATCH] [Neotab] Add, update CMP mapping to be compatible --- nvim/lua/plugins/lsp/cmp.lua | 6 ++---- nvim/lua/plugins/util/neotab.lua | 7 +++++++ 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 nvim/lua/plugins/util/neotab.lua diff --git a/nvim/lua/plugins/lsp/cmp.lua b/nvim/lua/plugins/lsp/cmp.lua index cc8c76a..481d3e1 100755 --- a/nvim/lua/plugins/lsp/cmp.lua +++ b/nvim/lua/plugins/lsp/cmp.lua @@ -56,12 +56,10 @@ return { [""] = 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" }), diff --git a/nvim/lua/plugins/util/neotab.lua b/nvim/lua/plugins/util/neotab.lua new file mode 100644 index 0000000..e35c404 --- /dev/null +++ b/nvim/lua/plugins/util/neotab.lua @@ -0,0 +1,7 @@ +return { + "kawre/neotab.nvim", + event = "InsertEnter", + opts = { + tabkey = "", + }, +}