chore(nvim): allow completion in comments
This commit is contained in:
parent
90ec768ab3
commit
d16d653a85
|
@ -82,11 +82,7 @@ cmp.setup({
|
||||||
},
|
},
|
||||||
-- https://github.com/hrsh7th/nvim-cmp/wiki/Advanced-techniques#disabling-completion-in-certain-contexts-such-as-comments
|
-- https://github.com/hrsh7th/nvim-cmp/wiki/Advanced-techniques#disabling-completion-in-certain-contexts-such-as-comments
|
||||||
enabled = function()
|
enabled = function()
|
||||||
local context = require("cmp.config.context")
|
return true
|
||||||
if vim.api.nvim_get_mode().mode == "c" then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("Comment")
|
|
||||||
end,
|
end,
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = { "kind", "abbr", "menu" },
|
fields = { "kind", "abbr", "menu" },
|
||||||
|
|
Loading…
Reference in New Issue