aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-03-08 14:44:58 +0100
committerLuuk van Baal <luukvbaal@gmail.com>2024-11-09 14:28:17 +0100
commit4f9260d06a48216862ebb34fc33744486b058f58 (patch)
treef69ecc9f6556e504af0f0b4aa04a72380f866162 /runtime
parent5cfa7a72f8c40cdcc0fa93693689915e913806f1 (diff)
downloadrneovim-4f9260d06a48216862ebb34fc33744486b058f58.tar.gz
rneovim-4f9260d06a48216862ebb34fc33744486b058f58.tar.bz2
rneovim-4f9260d06a48216862ebb34fc33744486b058f58.zip
feat(ext_messages): add hl_id to ext_messages chunks
Problem: Ext_messages chunks only contain the highlight attr id, which is not very useful for vim.ui_attach() consumers. Solotion: Add highlight group id to message chunks, which can easily be used to highlight text in the TUI through nvim_buf_set_extmark(): hl_group = synIDattr(id, "name").
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/news.txt2
-rw-r--r--runtime/doc/ui.txt9
2 files changed, 7 insertions, 4 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index df794596b8..41b9d623a2 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -283,6 +283,8 @@ UI
|hl-PmenuMatchSel| inherits highlights from both |hl-PmenuSel| and
|hl-PmenuMatch|.
+• |ui-messages| content chunks now also contain the highlight group ID.
+
==============================================================================
CHANGED FEATURES *news-changed*
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt
index cb057a8fd2..4ee8121034 100644
--- a/runtime/doc/ui.txt
+++ b/runtime/doc/ui.txt
@@ -805,10 +805,11 @@ must handle.
kinds as the empty kind.
content
- Array of `[attr_id, text_chunk]` tuples, building up the message
- text of chunks of different highlights. No extra spacing should be
- added between chunks, the `text_chunk` by itself contains any
- necessary whitespace. Messages can contain line breaks "\n".
+ Array of `[attr_id, text_chunk, hl_id]` tuples, building up the
+ message text of chunks of different highlights. No extra spacing
+ should be added between chunks, the `text_chunk` by itself
+ contains any necessary whitespace. Messages can contain line
+ breaks "\n".
replace_last
Decides how multiple messages should be displayed: