We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3346244 commit ce53a09Copy full SHA for ce53a09
lua/astroui/init.lua
@@ -44,8 +44,8 @@ end
44
---@param fallback? table The fallback highlight properties
45
---@return table properties # the highlight group properties
46
function M.get_hlgroup(name, fallback)
47
- if vim.fn.hlexists(name) == 1 then
48
- local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
+ local hl = vim.api.nvim_get_hl(0, { name = name, link = false, create = false })
+ if not vim.tbl_isempty(hl) then
49
if not hl.fg then hl.fg = "NONE" end
50
if not hl.bg then hl.bg = "NONE" end
51
if hl.reverse then
0 commit comments