mirror of
https://github.com/neovim/neovim
synced 2025-07-18 10:11:50 +00: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.
(cherry picked from commit 9c278af7cc
)
This commit is contained in:
committed by
github-actions[bot]
parent
950048b206
commit
b5b84b806a
@ -182,7 +182,12 @@ function vim.show_pos(bufnr, row, col, filter)
|
|||||||
append('Treesitter', 'Title')
|
append('Treesitter', 'Title')
|
||||||
nl()
|
nl()
|
||||||
for _, capture in ipairs(items.treesitter) do
|
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
|
end
|
||||||
nl()
|
nl()
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user