Skip to content

Commit

Permalink
fix(nvim): Use capture.capture instead of capture.hl_group
Browse files Browse the repository at this point in the history
hl_group name of comment by tree-sitter has changed.

before:
  capture.hl_group → "@comment"

now:
  capture.hl_group → "@comment.${LANG}"
  • Loading branch information
ogaken-1 committed Mar 9, 2023
1 parent 30256a2 commit d93b3bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/caw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function M.has_syntax(lnum, col)
local items = vim.inspect_pos(bufnr, lnum - 1, col - 1)
if #items.treesitter > 0 then
for _, capture in ipairs(items.treesitter) do
if capture.hl_group == "@comment" then
if capture.capture == "comment" then
return true
end
end
Expand Down

0 comments on commit d93b3bb

Please sign in to comment.