148 lines
3.5 KiB
Lua
148 lines
3.5 KiB
Lua
local cmd = vim.cmd
|
|
|
|
local override = require("core.utils").load_config().ui.hl_override
|
|
local colors = require("colors").get()
|
|
local ui = require("core.utils").load_config().ui
|
|
|
|
local black = colors.black
|
|
local black2 = colors.black2
|
|
local blue = colors.blue
|
|
local darker_black = colors.darker_black
|
|
local folder_bg = colors.folder_bg
|
|
local green = colors.green
|
|
local grey = colors.grey
|
|
local grey_fg = colors.grey_fg
|
|
local line = colors.line
|
|
local nord_blue = colors.nord_blue
|
|
local one_bg = colors.one_bg
|
|
local one_bg2 = colors.one_bg2
|
|
local pmenu_bg = colors.pmenu_bg
|
|
local purple = colors.purple
|
|
local red = colors.red
|
|
local white = colors.white
|
|
local yellow = colors.yellow
|
|
local one_bg3 = colors.one_bg3
|
|
|
|
-- functions for setting highlights
|
|
local fg = require("core.utils").fg
|
|
local fg_bg = require("core.utils").fg_bg
|
|
local bg = require("core.utils").bg
|
|
|
|
-- Comments
|
|
if ui.italic_comments then
|
|
fg("Comment", grey_fg .. " gui=italic")
|
|
else
|
|
fg("Comment", grey_fg)
|
|
end
|
|
|
|
-- Disable cusror line
|
|
cmd "hi clear CursorLine"
|
|
-- Line number
|
|
fg("cursorlinenr", white)
|
|
|
|
-- same it bg, so it doesn't appear
|
|
fg("EndOfBuffer", black)
|
|
|
|
-- For floating windows
|
|
fg("FloatBorder", blue)
|
|
bg("NormalFloat", one_bg)
|
|
|
|
-- Pmenu
|
|
bg("Pmenu", one_bg)
|
|
bg("PmenuSbar", one_bg2)
|
|
bg("PmenuSel", pmenu_bg)
|
|
bg("PmenuThumb", nord_blue)
|
|
fg("CmpItemAbbr", white)
|
|
fg("CmpItemAbbrMatch", white)
|
|
fg("CmpItemKind", white)
|
|
fg("CmpItemMenu", white)
|
|
|
|
-- misc
|
|
|
|
-- inactive statuslines as thin lines
|
|
fg("StatusLineNC", one_bg3 .. " gui=underline")
|
|
|
|
fg("LineNr", grey)
|
|
fg("NvimInternalError", red)
|
|
fg("VertSplit", one_bg2)
|
|
|
|
if ui.transparency then
|
|
bg("Normal", "NONE")
|
|
bg("Folded", "NONE")
|
|
fg("Folded", "NONE")
|
|
fg("Comment", grey)
|
|
end
|
|
|
|
-- [[ Plugin Highlights
|
|
|
|
-- Dashboard
|
|
fg("DashboardCenter", grey_fg)
|
|
fg("DashboardFooter", grey_fg)
|
|
fg("DashboardHeader", grey_fg)
|
|
fg("DashboardShortcut", grey_fg)
|
|
|
|
-- Git signs
|
|
fg_bg("DiffAdd", blue, "NONE")
|
|
fg_bg("DiffChange", grey_fg, "NONE")
|
|
fg_bg("DiffChangeDelete", red, "NONE")
|
|
fg_bg("DiffModified", red, "NONE")
|
|
fg_bg("DiffDelete", red, "NONE")
|
|
|
|
-- Indent blankline plugin
|
|
fg("IndentBlanklineChar", line)
|
|
|
|
-- ]]
|
|
|
|
-- [[ LspDiagnostics
|
|
|
|
-- Errors
|
|
fg("LspDiagnosticsSignError", red)
|
|
fg("LspDiagnosticsSignWarning", yellow)
|
|
fg("LspDiagnosticsVirtualTextError", red)
|
|
fg("LspDiagnosticsVirtualTextWarning", yellow)
|
|
|
|
-- Info
|
|
fg("LspDiagnosticsSignInformation", green)
|
|
fg("LspDiagnosticsVirtualTextInformation", green)
|
|
|
|
-- Hints
|
|
fg("LspDiagnosticsSignHint", purple)
|
|
fg("LspDiagnosticsVirtualTextHint", purple)
|
|
|
|
-- ]]
|
|
|
|
-- NvimTree
|
|
fg("NvimTreeEmptyFolderName", blue)
|
|
fg("NvimTreeEndOfBuffer", darker_black)
|
|
fg("NvimTreeFolderIcon", folder_bg)
|
|
fg("NvimTreeFolderName", folder_bg)
|
|
fg("NvimTreeGitDirty", red)
|
|
fg("NvimTreeIndentMarker", one_bg2)
|
|
bg("NvimTreeNormal", darker_black)
|
|
bg("NvimTreeNormalNC", darker_black)
|
|
fg("NvimTreeOpenedFolderName", blue)
|
|
fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree
|
|
fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
|
|
fg("NvimTreeVertSplit", darker_black)
|
|
bg("NvimTreeVertSplit", darker_black)
|
|
fg_bg("NvimTreeWindowPicker", red, black2)
|
|
|
|
-- Telescope
|
|
fg("TelescopeBorder", one_bg)
|
|
fg_bg("TelescopePreviewTitle", green, one_bg)
|
|
fg_bg("TelescopePromptTitle", blue, one_bg)
|
|
fg_bg("TelescopeResultsTitle", red, one_bg)
|
|
|
|
-- Disable some highlight in nvim tree if transparency enabled
|
|
if ui.transparency then
|
|
bg("NvimTreeNormal", "NONE")
|
|
bg("NvimTreeNormalNC", "NONE")
|
|
bg("NvimTreeStatusLineNC", "NONE")
|
|
bg("NvimTreeVertSplit", "NONE")
|
|
fg("NvimTreeVertSplit", grey)
|
|
end
|
|
|
|
if #override ~= 0 then
|
|
require(override)
|
|
end
|