feat(api): combined highlights in nvim_eval_statusline()

Problem:  Combined highlighting was not applied to nvim_eval_statusline(),
          and 'statuscolumn' sign segment/numhl highlights.
Solution: Add an additional `groups` element to the return value of
          `nvim_eval_statusline()->highlights`. This is an array of stacked
          highlight groups (highest priority last). Also resolve combined
          highlights for the 'statuscolumn' sign segment/numhl highlights.
          Expose/synchronize some drawline.c logic that is now mimicked in
          three different places.
This commit is contained in:
Luuk van Baal
2025-01-16 18:10:22 +01:00
committed by luukvbaal
parent 8634bd46b2
commit 34d808b73c
14 changed files with 244 additions and 236 deletions

View File

@@ -1131,7 +1131,9 @@ function vim.api.nvim_eval(expr) end
--- the "highlights" key in {opts} is true. Each element of the array is a
--- |Dict| with these keys:
--- - start: (number) Byte index (0-based) of first character that uses the highlight.
--- - group: (string) Name of highlight group.
--- - group: (string) Name of highlight group. May be removed in the future, use
--- `groups` instead.
--- - groups: (array) Names of stacked highlight groups (highest priority last).
function vim.api.nvim_eval_statusline(str, opts) end
--- @deprecated