aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-02-20 19:53:49 +0800
committerGitHub <noreply@github.com>2024-02-20 19:53:49 +0800
commita0790558c3097f2813c56e404af30c3e2d8b8983 (patch)
treee68f996439184015a2de06b6f72ff2fbe95fe842 /runtime
parent69bdcc68234e7f228b667f95b0e65d4ebe8d1f80 (diff)
downloadrneovim-a0790558c3097f2813c56e404af30c3e2d8b8983.tar.gz
rneovim-a0790558c3097f2813c56e404af30c3e2d8b8983.tar.bz2
rneovim-a0790558c3097f2813c56e404af30c3e2d8b8983.zip
fix(extmarks): priority order of inline and non-inline virt_text (#27532)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt7
-rw-r--r--runtime/lua/vim/_meta/api.lua7
2 files changed, 8 insertions, 6 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 83b50dcdbe..503529dd01 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -2754,9 +2754,10 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {*opts})
hidden marks, an "invalid" key is added to the "details"
array of |nvim_buf_get_extmarks()| and family. If
"undo_restore" is false, the extmark is deleted instead.
- • priority: a priority value for the highlight group or sign
- attribute. For example treesitter highlighting uses a
- value of 100.
+ • priority: a priority value for the highlight group, sign
+ attribute or virtual text. For virtual text, item with
+ highest priority is drawn last. For example treesitter
+ highlighting uses a value of 100.
• strict: boolean that indicates extmark should not be
placed if the line or column value is past the end of the
buffer or end of the line respectively. Defaults to true.
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
index 0978f0acf5..31ef3dd64b 100644
--- a/runtime/lua/vim/_meta/api.lua
+++ b/runtime/lua/vim/_meta/api.lua
@@ -576,9 +576,10 @@ function vim.api.nvim_buf_line_count(buffer) end
--- hidden marks, an "invalid" key is added to the "details"
--- array of `nvim_buf_get_extmarks()` and family. If
--- "undo_restore" is false, the extmark is deleted instead.
---- • priority: a priority value for the highlight group or sign
---- attribute. For example treesitter highlighting uses a
---- value of 100.
+--- • priority: a priority value for the highlight group, sign
+--- attribute or virtual text. For virtual text, item with
+--- highest priority is drawn last. For example treesitter
+--- highlighting uses a value of 100.
--- • strict: boolean that indicates extmark should not be
--- placed if the line or column value is past the end of the
--- buffer or end of the line respectively. Defaults to true.