|
@@ -1,30 +1,40 @@
|
|
|
|
|
+local function highlight_exists(name)
|
|
|
|
|
+ local success, _ = pcall(vim.api.nvim_get_hl_by_name, name, true)
|
|
|
|
|
+ return success
|
|
|
|
|
+end
|
|
|
|
|
+
|
|
|
|
|
+local function set_hl(name, config)
|
|
|
|
|
+ if not highlight_exists(name) then
|
|
|
|
|
+ vim.api.nvim_set_hl(0, name, config)
|
|
|
|
|
+ end
|
|
|
|
|
+end
|
|
|
|
|
+
|
|
|
return {
|
|
return {
|
|
|
setup = function()
|
|
setup = function()
|
|
|
-- Default highlight groups. Looks best if customized.
|
|
-- Default highlight groups. Looks best if customized.
|
|
|
vim.api.nvim_set_hl(0, "StatusBeastDiagnosticEmpty",
|
|
vim.api.nvim_set_hl(0, "StatusBeastDiagnosticEmpty",
|
|
|
{ link = "NonText" })
|
|
{ link = "NonText" })
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastDiagnosticInfo", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastDiagnosticHint", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastDiagnosticWarn", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastDiagnosticError", { link = "Error" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastGitEmpty", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastGitAdd", { link = "DiffAdd" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastGitChange", { link = "DiffChange" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastGitDelete", { link = "DiffDelete" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeNormal", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeVisual", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeSelect", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeReplace", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeInsert", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeCommand", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeTerminal", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastModeOther", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastStatusLine",
|
|
|
|
|
- { link = "WinSeparator" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastBarNormal", { link = "Normal" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastBarHighlight", { link = "Cursor" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastBarItalic", { link = "Italic" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastBarIcon", { link = "Special" })
|
|
|
|
|
- vim.api.nvim_set_hl(0, "StatusBeastBarError", { link = "Error" })
|
|
|
|
|
|
|
+ set_hl("StatusBeastDiagnosticInfo", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastDiagnosticHint", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastDiagnosticWarn", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastDiagnosticError", { link = "Error" })
|
|
|
|
|
+ set_hl("StatusBeastGitEmpty", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastGitAdd", { link = "DiffAdd" })
|
|
|
|
|
+ set_hl("StatusBeastGitChange", { link = "DiffChange" })
|
|
|
|
|
+ set_hl("StatusBeastGitDelete", { link = "DiffDelete" })
|
|
|
|
|
+ set_hl("StatusBeastModeNormal", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeVisual", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeSelect", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeReplace", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeInsert", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeCommand", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeTerminal", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastModeOther", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastStatusLine", { link = "WinSeparator" })
|
|
|
|
|
+ set_hl("StatusBeastBarNormal", { link = "Normal" })
|
|
|
|
|
+ set_hl("StatusBeastBarHighlight", { link = "Cursor" })
|
|
|
|
|
+ set_hl("StatusBeastBarItalic", { link = "Italic" })
|
|
|
|
|
+ set_hl("StatusBeastBarIcon", { link = "Special" })
|
|
|
|
|
+ set_hl("StatusBeastBarError", { link = "Error" })
|
|
|
end
|
|
end
|
|
|
}
|
|
}
|