feat(nvim): disable cmp for IncRename
This commit is contained in:
parent
116fc30524
commit
12a5420ee9
1 changed files with 11 additions and 0 deletions
|
@ -76,6 +76,17 @@ cmp.setup.cmdline(":", {
|
|||
}, {
|
||||
{ name = "cmdline" },
|
||||
}),
|
||||
enabled = function()
|
||||
-- Set of commands where cmp will be disabled
|
||||
local disabled = {
|
||||
IncRename = true,
|
||||
}
|
||||
-- Get first word of cmdline
|
||||
local cmd = vim.fn.getcmdline():match("%S+")
|
||||
-- Return true if cmd isn't disabled
|
||||
-- else call/return cmp.close(), which returns false
|
||||
return not disabled[cmd] or cmp.close()
|
||||
end,
|
||||
})
|
||||
-- If you want insert `(` after select function or method item
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
|
Loading…
Reference in a new issue