fix: Fix linter warning

This commit is contained in:
punkfairie 2024-12-01 11:12:17 -08:00
parent 64c6e1e1e8
commit 86cc51458a
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696

View file

@ -25,7 +25,7 @@ end
---@return {fg?:string}?
function M.fg(name)
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
local fg = hl and hl.fg or hl.foreground
local fg = hl and hl.fg or nil
return fg and { fg = string.format('#%06x', fg) } or nil
end