vim: disable completion within comments

This commit is contained in:
Fernando Schauenburg 2023-07-13 22:15:30 +02:00
parent ef2b80a534
commit cbfcce798a

View file

@ -46,6 +46,12 @@ local config = function()
cmp.setup { cmp.setup {
mapping = keymap, mapping = keymap,
enabled = function()
local c = require 'cmp.config.context'
return not c.in_treesitter_capture('comment') and
not c.in_syntax_group('Comment')
end,
snippet = { snippet = {
expand = function(args) expand = function(args)
require('luasnip').lsp_expand(args.body) require('luasnip').lsp_expand(args.body)