mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(treesitter): use capture metadata range if exists
use `treesitter.get_range` instead of inline expression
This commit is contained in:
parent
b83f949fd9
commit
469e6bfc56
@ -236,7 +236,8 @@ local function on_line_impl(self, buf, line, is_spell_nav)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
local start_row, start_col, end_row, end_col = node:range()
|
local range = vim.treesitter.get_range(node, buf, metadata[capture])
|
||||||
|
local start_row, start_col, _, end_row, end_col, _ = unpack(range)
|
||||||
local hl = highlighter_query.hl_cache[capture]
|
local hl = highlighter_query.hl_cache[capture]
|
||||||
|
|
||||||
local capture_name = highlighter_query:query().captures[capture]
|
local capture_name = highlighter_query:query().captures[capture]
|
||||||
|
Loading…
Reference in New Issue
Block a user