mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 12:45:17 -07:00
fix(treesitter): use vim.highlight.priorities instead of hardcoded 100 (#24052)
Problem: Treesitter highlighting base priority cannot be customized. Solution: Use `vim.highlight.priorities.treesitter` instead of hard-coded value.
This commit is contained in:
parent
8a7e3353eb
commit
8c9dab3e0d
@ -260,12 +260,14 @@ local function on_line_impl(self, buf, line, is_spell_nav)
|
||||
local spell_pri_offset = capture_name == 'nospell' and 1 or 0
|
||||
|
||||
if hl and end_row >= line and (not is_spell_nav or spell ~= nil) then
|
||||
local priority = (tonumber(metadata.priority) or vim.highlight.priorities.treesitter)
|
||||
+ spell_pri_offset
|
||||
api.nvim_buf_set_extmark(buf, ns, start_row, start_col, {
|
||||
end_line = end_row,
|
||||
end_col = end_col,
|
||||
hl_group = hl,
|
||||
ephemeral = true,
|
||||
priority = (tonumber(metadata.priority) or 100) + spell_pri_offset, -- Low but leaves room below
|
||||
priority = priority,
|
||||
conceal = metadata.conceal,
|
||||
spell = spell,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user