2022-11-21 06:25:21 +08:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
M.colors = {
|
2022-11-23 23:12:02 +08:00
|
|
|
Error = "ErrorMsg",
|
2022-11-29 17:30:14 +08:00
|
|
|
H1 = "IncSearch",
|
2022-11-23 23:12:02 +08:00
|
|
|
H2 = "Bold",
|
2022-11-21 06:25:21 +08:00
|
|
|
Muted = "Comment",
|
|
|
|
Normal = "NormalFloat",
|
2022-11-23 23:12:02 +08:00
|
|
|
Commit = "@variable.builtin",
|
2022-11-25 05:06:05 +08:00
|
|
|
Key = "Conceal",
|
2022-11-23 23:12:02 +08:00
|
|
|
Value = "@string",
|
2022-11-21 06:25:21 +08:00
|
|
|
ProgressDone = {
|
|
|
|
bold = true,
|
|
|
|
default = true,
|
|
|
|
fg = "#ff007c",
|
|
|
|
},
|
|
|
|
ProgressTodo = "LineNr",
|
2022-12-26 16:35:19 +08:00
|
|
|
NoCond = "DiagnosticError",
|
2022-11-21 06:25:21 +08:00
|
|
|
Special = "@punctuation.special",
|
2022-12-06 06:14:04 +08:00
|
|
|
HandlerRuntime = "@macro",
|
2022-12-05 21:46:46 +08:00
|
|
|
HandlerPlugin = "Special",
|
|
|
|
HandlerEvent = "Constant",
|
|
|
|
HandlerKeys = "Statement",
|
|
|
|
HandlerStart = "@field",
|
|
|
|
HandlerSource = "Character",
|
|
|
|
HandlerFt = "Character",
|
|
|
|
HandlerCmd = "Operator",
|
2022-11-29 17:30:14 +08:00
|
|
|
Button = "CursorLine",
|
|
|
|
ButtonActive = "Visual",
|
2022-11-21 06:25:21 +08:00
|
|
|
}
|
|
|
|
|
2022-11-21 06:34:35 +08:00
|
|
|
M.did_setup = false
|
2022-11-21 06:25:21 +08:00
|
|
|
|
|
|
|
function M.set_hl()
|
|
|
|
for hl_group, opts in pairs(M.colors) do
|
|
|
|
if type(opts) == "string" then
|
2022-11-21 06:34:35 +08:00
|
|
|
opts = { link = opts }
|
2022-11-21 06:25:21 +08:00
|
|
|
end
|
|
|
|
opts.default = true
|
2022-11-21 06:34:35 +08:00
|
|
|
vim.api.nvim_set_hl(0, "Lazy" .. hl_group, opts)
|
2022-11-21 06:25:21 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
function M.setup()
|
|
|
|
if M.did_setup then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
M.did_setup = true
|
|
|
|
|
|
|
|
M.set_hl()
|
|
|
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
|
|
|
callback = function()
|
|
|
|
M.set_hl()
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|