commit 543e14d04085c5e8f613220bb39632c822ee8996
parent f7b573f80a33e7d6aba2d7a35a1a9f1a14a7ffca
Author: glepnir <glephunter@gmail.com>
Date: Mon, 26 Jan 2026 21:31:57 +0800
docs: nvim_set_hl fg_index, bg_indexed #37534
Diffstat:
3 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
@@ -1548,6 +1548,10 @@ nvim_set_hl({ns_id}, {name}, {val}) *nvim_set_hl()*
accepts the following keys:
• fg: color name or "#RRGGBB", see note.
• bg: color name or "#RRGGBB", see note.
+ • fg_indexed: boolean When true, fg is a terminal palette
+ index (0-255). Default is false.
+ • bg_indexed: boolean Same as fg_indexed, but for background
+ color.
• sp: color name or "#RRGGBB"
• blend: integer between 0 and 100
• bold: boolean
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua
@@ -2200,6 +2200,11 @@ function vim.api.nvim_set_decoration_provider(ns_id, opts) end
--- @param val vim.api.keyset.highlight Highlight definition map, accepts the following keys:
--- - fg: color name or "#RRGGBB", see note.
--- - bg: color name or "#RRGGBB", see note.
+--- - fg_indexed: boolean
+--- When true, fg is a terminal palette index (0-255).
+--- Default is false.
+--- - bg_indexed: boolean
+--- Same as fg_indexed, but for background color.
--- - sp: color name or "#RRGGBB"
--- - blend: integer between 0 and 100
--- - bold: boolean
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
@@ -144,6 +144,11 @@ DictAs(get_hl_info) nvim_get_hl(Integer ns_id, Dict(get_highlight) *opts, Arena
/// @param val Highlight definition map, accepts the following keys:
/// - fg: color name or "#RRGGBB", see note.
/// - bg: color name or "#RRGGBB", see note.
+/// - fg_indexed: boolean
+/// When true, fg is a terminal palette index (0-255).
+/// Default is false.
+/// - bg_indexed: boolean
+/// Same as fg_indexed, but for background color.
/// - sp: color name or "#RRGGBB"
/// - blend: integer between 0 and 100
/// - bold: boolean