I was getting frustrated with nvim-cmp as the default setup for it in NvChad is to annoyingly pop crap up all the time as I type. I was hoping to set it to only do it when the tab key is pressed or something, but I’m going to settle for *Control+Backslash
I’m sure there’s a way to do this from the init.lua instead of editing NvChad core stuff, but I’m still new to it and this is how I accomplished it.
I edited .config/nvim/lua/plugins/config/cmp.lua and added autocomplete=false, in the options block, so the top of that block now looks like this:
local options = { completion = { completeopt = "menu,menuone", autocomplete = false, -- < -- this is the important line }, -- and more default stuff after that... }
Then I found the mapping for Control+Space and changed it to Control+Backslash because Control+Space is how I trigger the IME.
mapping = { [""] = cmp.mapping.select_prev_item(), [" "] = cmp.mapping.select_next_item(), [" "] = cmp.mapping.scroll_docs(-4), [" "] = cmp.mapping.scroll_docs(4), [" "] = cmp.mapping.complete(), -- <-- it's this one [" "] = cmp.mapping.close(), [" "] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Insert, select = true, }, -- and more default stuff after that... }
=> index | tags | prev ⏰ | ⏰ next
created: 2023-09-30
(re)generated: 2025-01-29
text/gemini
This content has been proxied by September (3851b).