mirror of
https://github.com/neovim/neovim.git
synced 2026-06-17 17:21:16 +00:00
fix(diagnostic): stack _tags hl-groups in a single extmark #38654
Problem: Diagnostic highlight groups were applied by iterating and calling `vim.hl.range` for each group individually. That resulted in multiple extmarks with the same priority being created separately, which does not allow `DiagnosticUnnecessary` and `DiagnosticDeprecated` with matching options override `Diagnostic*` styling. Solution: Pass the list of hl-groups to `vim.hl.range` so they are applied together in the correct order.
This commit is contained in:
@@ -40,7 +40,8 @@ M.priorities = {
|
||||
---
|
||||
---@param buf integer Buffer number to apply highlighting to
|
||||
---@param ns integer Namespace to add highlight to
|
||||
---@param higroup string Highlight group to use for highlighting
|
||||
---@param higroup integer|integer[]|string|string[] Highlight group used for the text range.
|
||||
--- See the `hl_group` option in |nvim_buf_set_extmark()|.
|
||||
---@param start [integer,integer]|string Start of region as a (line, column) tuple or string accepted by |getpos()|
|
||||
---@param finish [integer,integer]|string End of region as a (line, column) tuple or string accepted by |getpos()|
|
||||
---@param opts? vim.hl.range.Opts
|
||||
|
||||
Reference in New Issue
Block a user