mirror of
https://github.com/neovim/neovim.git
synced 2024-12-27 14:21:31 -07:00
fix(inspect): show priority for treesitter highlights
Problem: `:Inspect` does not show priority for treesitter highlights, leading to confusion why sometimes earlier highlights override later highlights. Solution: Also print priority metadata if set.
This commit is contained in:
parent
ec94c2704f
commit
9c278af7cc
@ -191,7 +191,12 @@ function vim.show_pos(bufnr, row, col, filter)
|
||||
append('Treesitter', 'Title')
|
||||
nl()
|
||||
for _, capture in ipairs(items.treesitter) do
|
||||
item(capture, capture.lang)
|
||||
item(
|
||||
capture,
|
||||
capture.metadata.priority
|
||||
and string.format('%s priority: %d', capture.lang, capture.metadata.priority)
|
||||
or capture.lang
|
||||
)
|
||||
end
|
||||
nl()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user