Closed krisfans closed 1 year ago
It is not the error of dein.vim.
https://github.com/tyru/caw.vim/blob/master/lua/caw.lua#L26
It is incompatible with current neovim treesitter.
function M.has_syntax(lnum, col)
local bufnr = vim.api.nvim_get_current_buf()
for _, capture in pairs(vim.treesitter.get_captures_at_pos(bufnr, lnum - 1, col - 1)) do
for _, cap in pairs(capture) do
if string.match(cap, 'comment') then
return true
end
end
end
return false
end
It works for me.
Description
caw.vim can't works well with treesitter when using dein.vim.
To Reproduce
Steps to reproduce the behavior:
nvim -u mini.vim test.c
gcc
(toggle commet key definede by caw.vim) On the line that is commented by//
Expected behavior
The hotkey
gcc
should toggle comment normally.Screenshots
Desktop:
Please complete the following information, when reporting bugs related to the Dein.vim.
Minimal Config
See the minimal config example at README#Config Example, you can remove comments unrelated to the issue.
Additional context
Add any other context about the problem here.