diff options
| author | glepnir <glephunter@gmail.com> | 2026-03-25 18:01:50 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-25 06:01:50 -0400 |
| commit | 4d04d0123d2571391a00b87f7ee70f987fb7cedd (patch) | |
| tree | f5ef7cd1a28c929fb305f8be14443cc48f36a44d /runtime/lua/vim/_meta/api.lua | |
| parent | 170ff4b24487e7350248d1a745b69979ada185ce (diff) | |
feat(api): nvim_set_hl{update:boolean} #37546
Problem: nvim_set_hl always replaces all attributes.
Solution: Add update field. When true, merge with existing
attributes instead of replacing. Unspecified attributes are preserved.
If highlight group doesn't exist, falls back to reset mode.
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/api.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index ccaa6192aa..380058a287 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -2253,6 +2253,7 @@ function vim.api.nvim_set_decoration_provider(ns_id, opts) end --- - underdotted: boolean --- - underdouble: boolean --- - underline: boolean +--- - update: boolean false by default; true updates only specified attributes, leaving others unchanged. function vim.api.nvim_set_hl(ns_id, name, val) end --- Set active namespace for highlights defined with `nvim_set_hl()`. This can be set for |
