-
Notifications
You must be signed in to change notification settings - Fork 408
Advanced techniques
Zoltán Reegn edited this page Jan 12, 2022
·
15 revisions
This page contains advanced techniques.
nvim-cmp has the Programatic API. So you can manage the completion behavior by yourself.
See https://github.com/hrsh7th/nvim-cmp/issues/519#issuecomment-969674104
See https://github.com/hrsh7th/nvim-cmp/pull/676#issuecomment-1002532096
cmd.setup({
enabled = function()
-- disable completion in comments
local context = require 'cmp.config.context'
return not context.in_treesitter_capture("comment")
and not context.in_syntax_group("Comment")
})