You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a new file in Neo-tree, I get autocomplete suggestions. Is there something in nvim-cmp I can do to disable the suggestions when I'm a popup or non-editing buffer like Neo-tree?
The text was updated successfully, but these errors were encountered:
I had the same problem after removing cmp suggestions on comment lines, then i started getting suggestions i neo-tree actions instead. I solved it by adding this to my cmp config - hope it helps :)
-- This removed suggestions from neo-tree actions like add, remove etc.
local buftype = vim.bo.buftype
if buftype == 'prompt' then
return false
end
cmp.setup({
-- all your config settings here
enabled = function()
local context = require('cmp.config.context')
local buftype = vim.bo.buftype
if buftype == 'prompt' then
return false
end
-- remove suggestions on comment lines
return not context.in_treesitter_capture('comment') and not context.in_syntax_group('Comment')
end,
})
When adding a new file in Neo-tree, I get autocomplete suggestions. Is there something in nvim-cmp I can do to disable the suggestions when I'm a popup or non-editing buffer like Neo-tree?
The text was updated successfully, but these errors were encountered: