aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2025-01-21 12:32:20 +0100
committerGitHub <noreply@github.com>2025-01-21 12:32:20 +0100
commitd7aba51d39c7409ef388ed7cffe3e31d9fcec163 (patch)
tree0f0dd5c20e65568e013c4d838ea83d5d660b873d /runtime
parent05435bf10585e7f850ff44acd63446fbcc56bfe5 (diff)
parent4cced601c8cdfd6253266b035667dd0383a07ebe (diff)
downloadrneovim-d7aba51d39c7409ef388ed7cffe3e31d9fcec163.tar.gz
rneovim-d7aba51d39c7409ef388ed7cffe3e31d9fcec163.tar.bz2
rneovim-d7aba51d39c7409ef388ed7cffe3e31d9fcec163.zip
Merge pull request #32098 from bfredl/multihl_group
feat(extmark): stack multiple highlight groups in `hl_group`
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt2
-rw-r--r--runtime/doc/news.txt1
-rw-r--r--runtime/lua/vim/_meta/api.lua3
-rw-r--r--runtime/lua/vim/_meta/api_keysets.lua2
4 files changed, 7 insertions, 1 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 5163f24ac8..b452db9f3e 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -2593,6 +2593,8 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {opts})
and below highlight groups can be supplied either as a
string or as an integer, the latter of which can be
obtained using |nvim_get_hl_id_by_name()|.
+ Multiple highlight groups can be stacked by passing an
+ array (highest priority last).
• hl_eol : when true, for a multiline highlight covering the
EOL of a line, continue the highlight for the rest of the
screen line (just like for diff and cursorline highlight).
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 58dab586d9..0d5fa3ca18 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -193,6 +193,7 @@ API
• |nvim_echo()| `err` field to print error messages and `chunks` accepts
highlight group IDs.
• |nvim_open_win()| `relative` field can be set to "laststatus" and "tabline".
+• |nvim_buf_set_extmark()| `hl_group` field can be an array of layered groups
DEFAULTS
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 4168d5b857..2f9ab5b846 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -574,6 +574,9 @@ function vim.api.nvim_buf_line_count(buffer) end
--- - hl_group : highlight group used for the text range. This and below
--- highlight groups can be supplied either as a string or as an integer,
--- the latter of which can be obtained using `nvim_get_hl_id_by_name()`.
+---
+--- Multiple highlight groups can be stacked by passing an array (highest
+--- priority last).
--- - hl_eol : when true, for a multiline highlight covering the
--- EOL of a line, continue the highlight for the rest
--- of the screen line (just like for diff and
diff --git a/runtime/lua/vim/_meta/api_keysets.lua b/runtime/lua/vim/_meta/api_keysets.lua
index 98e916115e..26c2c963de 100644
--- a/runtime/lua/vim/_meta/api_keysets.lua
+++ b/runtime/lua/vim/_meta/api_keysets.lua
@@ -241,7 +241,7 @@ error('Cannot require a meta file')
--- @field end_line? integer
--- @field end_row? integer
--- @field end_col? integer
---- @field hl_group? integer|string
+--- @field hl_group? any
--- @field virt_text? any[]
--- @field virt_text_pos? string
--- @field virt_text_win_col? integer