fix(api): validation, documentation of hl_group #31195

Problem:  Documentation for "hl_group" in nvim_buf_set_extmark() is
          unclear. "hl_group" in nvim_echo() does not accept
          highlight group id.
Solution: Move documentation for highlight group name/id to first
          mention of hl_group. Update nvim_echo() to accept highlight
          group id.
This commit is contained in:
luukvbaal
2024-11-17 00:36:11 +01:00
committed by GitHub
parent f85bc41c80
commit 9c718bc2bc
6 changed files with 69 additions and 62 deletions

View File

@@ -779,8 +779,8 @@ void nvim_set_vvar(String name, Object value, Error *err)
/// Echo a message.
///
/// @param chunks A list of `[text, hl_group]` arrays, each representing a
/// text chunk with specified highlight. `hl_group` element
/// can be omitted for no highlight.
/// text chunk with specified highlight group name or ID.
/// `hl_group` element can be omitted for no highlight.
/// @param history if true, add to |message-history|.
/// @param opts Optional parameters.
/// - verbose: Message is printed as a result of 'verbose' option.