fix(util): color() should not create hl groups

This commit is contained in:
Folke Lemaitre 2025-10-26 20:11:19 +01:00
parent 3a8ecf5912
commit 17033e67ef
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -70,7 +70,7 @@ function M.color(group, prop)
group = type(group) == "table" and group or { group }
---@cast group string[]
for _, g in ipairs(group) do
local hl = vim.api.nvim_get_hl(0, { name = g, link = false })
local hl = vim.api.nvim_get_hl(0, { name = g, link = false, create = false })
if hl[prop] then
return string.format("#%06x", hl[prop])
end