vim: disable completion within comments
This commit is contained in:
parent
ef2b80a534
commit
cbfcce798a
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Reference in a new issue