Skip to content

Commit

Permalink
fix: use vim.hl if available
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaSolOs authored and lewis6991 committed Oct 27, 2024
1 parent e7fdb4c commit 5bd21aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/treesitter-context/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ local function highlight_contexts(bufnr, ctx_bufnr, contexts)
else
hl = buf_query.hl_cache[capture]
end
local priority = tonumber(metadata.priority) or vim.highlight.priorities.treesitter
local priority = tonumber(metadata.priority)
or (vim.hl and vim.hl.priorities.treesitter)
or vim.highlight.priorities.treesitter
add_extmark(ctx_bufnr, msrow, nscol, {
end_row = merow,
end_col = necol,
Expand Down

0 comments on commit 5bd21aa

Please sign in to comment.