feat(treesitter): allow to set highlight priority for queries

This commit is contained in:
Stephan Seitz
2021-07-17 14:41:17 +02:00
parent a8c3d50fad
commit 242608e669
2 changed files with 45 additions and 2 deletions

View File

@@ -248,7 +248,7 @@ local function on_line_impl(self, buf, line)
end
while line >= state.next_row do
local capture, node = state.iter()
local capture, node, metadata = state.iter()
if capture == nil then break end
@@ -260,7 +260,7 @@ local function on_line_impl(self, buf, line)
{ end_line = end_row, end_col = end_col,
hl_group = hl,
ephemeral = true,
priority = 100 -- Low but leaves room below
priority = tonumber(metadata.priority) or 100 -- Low but leaves room below
})
end
if start_row > line then