marleyvim/nvim/lua/lib/lazyvim/ui.lua

14 lines
329 B
Lua
Raw Normal View History

2024-11-28 13:13:57 -08:00
--https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/util/ui.lua
---@class lib.lazyvim.ui
local M = {}
2024-11-30 12:51:28 -08:00
---@return {fg?:string}?
function M.fg(name)
local hl = vim.api.nvim_get_hl(0, { name = name, link = false })
2024-12-01 11:12:17 -08:00
local fg = hl and hl.fg or nil
2024-11-30 12:51:28 -08:00
return fg and { fg = string.format('#%06x', fg) } or nil
end
2024-11-28 13:13:57 -08:00
return M