fix: adapt to breaking change on master (#90)

This is a stop-gap fix to avoid errors on latest master after neovim/neovim#19931

This at least gives useful information (the capture name, albeit without leading @), but a full rewrite is needed once nvim-treesitter decides on how to handle the upstream changes to highlight group names.
master
Christian Clason 2 years ago committed by GitHub
parent ce7e4b7575
commit a0aeb6af82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -65,7 +65,7 @@ function M.get_hl_groups_at_position(bufnr, row, col)
if hl and ts_utils.is_in_node_range(node, row, col) then
local c = query._query.captures[capture] -- name of the capture in the query
if c ~= nil then
local general_hl, is_vim_hl = query:_get_hl_from_capture(capture)
local general_hl, is_vim_hl = c, false
local local_hl = not is_vim_hl and (tree:lang() .. general_hl)
table.insert(
matches,

Loading…
Cancel
Save