aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/hl.lua
diff options
context:
space:
mode:
authorArtem Krinitsyn <arkriny@gmail.com>2026-06-02 22:36:03 +0000
committerGitHub <noreply@github.com>2026-06-02 18:36:03 -0400
commit738cd366f99e2bdf9b7c55b292997c934845a109 (patch)
tree3a8e7db54f74f52afff282963aec91594da01ee8 /runtime/lua/vim/hl.lua
parentcf9ad39267d9dc5f15ff0e4c6eda236b2c7e39fe (diff)
downloadrneovim-738cd366f99e2bdf9b7c55b292997c934845a109.tar.gz
rneovim-738cd366f99e2bdf9b7c55b292997c934845a109.tar.bz2
rneovim-738cd366f99e2bdf9b7c55b292997c934845a109.zip
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.
Diffstat (limited to 'runtime/lua/vim/hl.lua')
-rw-r--r--runtime/lua/vim/hl.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/hl.lua b/runtime/lua/vim/hl.lua
index 08307457b1..8fc921b5a1 100644
--- a/runtime/lua/vim/hl.lua
+++ b/runtime/lua/vim/hl.lua
@@ -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