feat(api): nvim_set_hl can set "font" #37668

Problem: Cannot set highlight group fonts via API, only via :highlight
command.

Solution: Add font parameter in nvim_set_hl().
This commit is contained in:
glepnir
2026-04-12 23:19:40 +08:00
committed by GitHub
parent 37eb1b9979
commit 1033739b60
10 changed files with 106 additions and 5 deletions

View File

@@ -2240,6 +2240,7 @@ function vim.api.nvim_set_decoration_provider(ns_id, opts) end
--- - dim: boolean
--- - fg: color name or "#RRGGBB", see note.
--- - fg_indexed: boolean (default false) If true, fg is a terminal palette index (0-255).
--- - font: GUI font name (string). Sets `highlight-font`. Use "NONE" to clear.
--- - force: if true force update the highlight group when it exists.
--- - italic: boolean
--- - link: Name of highlight group to link to. `:hi-link`