2021-06-14 02:27:56 +00:00
|
|
|
local cmd = vim.cmd
|
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
local colors = require("colors").get()
|
2021-06-14 02:27:56 +00:00
|
|
|
|
|
|
|
local black = colors.black
|
|
|
|
local black2 = colors.black2
|
2021-08-22 07:49:15 +00:00
|
|
|
local blue = colors.blue
|
|
|
|
local darker_black = colors.darker_black
|
|
|
|
local folder_bg = colors.folder_bg
|
|
|
|
local green = colors.green
|
2021-06-14 02:27:56 +00:00
|
|
|
local grey = colors.grey
|
|
|
|
local grey_fg = colors.grey_fg
|
|
|
|
local line = colors.line
|
|
|
|
local nord_blue = colors.nord_blue
|
2021-08-22 07:49:15 +00:00
|
|
|
local one_bg = colors.one_bg
|
|
|
|
local one_bg2 = colors.one_bg2
|
2021-08-16 13:34:09 +00:00
|
|
|
local pmenu_bg = colors.pmenu_bg
|
2021-08-22 07:49:15 +00:00
|
|
|
local purple = colors.purple
|
|
|
|
local red = colors.red
|
|
|
|
local white = colors.white
|
|
|
|
local yellow = colors.yellow
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
local ui = require("core.utils").load_config().ui
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Define bg color
|
|
|
|
-- @param group Group
|
|
|
|
-- @param color Color
|
2021-06-14 02:27:56 +00:00
|
|
|
local function bg(group, color)
|
2021-08-16 07:49:09 +00:00
|
|
|
cmd("hi " .. group .. " guibg=" .. color)
|
2021-06-14 02:27:56 +00:00
|
|
|
end
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Define fg color
|
|
|
|
-- @param group Group
|
|
|
|
-- @param color Color
|
2021-08-22 07:49:15 +00:00
|
|
|
local function fg(group, color)
|
|
|
|
cmd("hi " .. group .. " guifg=" .. color)
|
|
|
|
end
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Define bg and fg color
|
|
|
|
-- @param group Group
|
|
|
|
-- @param fgcol Fg Color
|
|
|
|
-- @param bgcol Bg Color
|
2021-06-14 02:27:56 +00:00
|
|
|
local function fg_bg(group, fgcol, bgcol)
|
2021-08-16 07:49:09 +00:00
|
|
|
cmd("hi " .. group .. " guifg=" .. fgcol .. " guibg=" .. bgcol)
|
2021-06-14 02:27:56 +00:00
|
|
|
end
|
|
|
|
|
2021-08-19 12:29:08 +00:00
|
|
|
-- Comments
|
|
|
|
if ui.italic_comments then
|
2021-08-22 07:49:15 +00:00
|
|
|
fg("Comment", grey_fg .. " gui=italic")
|
2021-08-19 12:29:08 +00:00
|
|
|
else
|
|
|
|
fg("Comment", grey_fg)
|
|
|
|
end
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Disable cusror line
|
|
|
|
cmd "hi clear CursorLine"
|
|
|
|
-- Line number
|
|
|
|
fg("cursorlinenr", white)
|
2021-08-22 07:49:15 +00:00
|
|
|
|
|
|
|
-- same it bg, so it doesn't appear
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("EndOfBuffer", black)
|
2021-08-22 07:49:15 +00:00
|
|
|
|
|
|
|
-- For floating windows
|
|
|
|
fg("FloatBorder", blue)
|
|
|
|
bg("NormalFloat", one_bg)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
|
|
|
-- Pmenu
|
|
|
|
bg("Pmenu", one_bg)
|
|
|
|
bg("PmenuSbar", one_bg2)
|
2021-08-16 13:34:09 +00:00
|
|
|
bg("PmenuSel", pmenu_bg)
|
2021-06-14 02:27:56 +00:00
|
|
|
bg("PmenuThumb", nord_blue)
|
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
-- misc
|
|
|
|
fg("LineNr", grey)
|
|
|
|
|
|
|
|
fg("NvimInternalError", red)
|
|
|
|
|
2021-06-14 02:27:56 +00:00
|
|
|
-- inactive statuslines as thin splitlines
|
2021-09-02 08:11:43 +00:00
|
|
|
fg("StatusLineNC", one_bg2 .. " gui=underline")
|
|
|
|
fg("VertSplit", one_bg2)
|
2021-08-22 07:49:15 +00:00
|
|
|
-- fg_bg("Visual",light_grey, colors.lightbg)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
if ui.transparency then
|
|
|
|
bg("Normal", "NONE")
|
|
|
|
bg("Folded", "NONE")
|
|
|
|
fg("Folded", "NONE")
|
|
|
|
fg("Comment", grey)
|
|
|
|
end
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- [[ Plugin Highlights
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Dashboard
|
2021-08-22 07:49:15 +00:00
|
|
|
fg("DashboardCenter", grey_fg)
|
|
|
|
fg("DashboardFooter", grey_fg)
|
|
|
|
fg("DashboardHeader", grey_fg)
|
|
|
|
fg("DashboardShortcut", grey_fg)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Git signs
|
2021-08-22 07:49:15 +00:00
|
|
|
fg_bg("DiffAdd", nord_blue, "none")
|
|
|
|
fg_bg("DiffChange", grey_fg, "none")
|
|
|
|
fg_bg("DiffModified", nord_blue, "none")
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Indent blankline plugin
|
2021-08-22 07:49:15 +00:00
|
|
|
fg("IndentBlanklineChar", line)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- ]]
|
|
|
|
|
|
|
|
-- [[ LspDiagnostics
|
|
|
|
|
|
|
|
-- Errors
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("LspDiagnosticsSignError", red)
|
|
|
|
fg("LspDiagnosticsSignWarning", yellow)
|
2021-08-22 07:49:15 +00:00
|
|
|
fg("LspDiagnosticsVirtualTextError", red)
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("LspDiagnosticsVirtualTextWarning", yellow)
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Info
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("LspDiagnosticsSignInformation", green)
|
|
|
|
fg("LspDiagnosticsVirtualTextInformation", green)
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Hints
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("LspDiagnosticsSignHint", purple)
|
|
|
|
fg("LspDiagnosticsVirtualTextHint", purple)
|
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- ]]
|
|
|
|
|
|
|
|
-- NvimTree
|
2021-08-22 07:49:15 +00:00
|
|
|
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)
|
|
|
|
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)
|
2021-08-26 05:04:48 +00:00
|
|
|
|
|
|
|
-- Disable some highlight in nvim tree if transparency enabled
|
2021-08-22 07:49:15 +00:00
|
|
|
if ui.transparency then
|
2021-08-19 09:06:49 +00:00
|
|
|
bg("NvimTreeNormal", "NONE")
|
2021-08-22 07:49:15 +00:00
|
|
|
bg("NvimTreeStatusLineNC", "NONE")
|
2021-08-19 09:06:49 +00:00
|
|
|
bg("NvimTreeVertSplit", "NONE")
|
|
|
|
fg("NvimTreeVertSplit", grey)
|
|
|
|
end
|
2021-07-10 06:23:47 +00:00
|
|
|
|
2021-08-26 05:04:48 +00:00
|
|
|
-- Telescope
|
2021-08-22 07:49:15 +00:00
|
|
|
fg("TelescopeBorder", line)
|
|
|
|
fg("TelescopePreviewBorder", grey)
|
|
|
|
fg("TelescopePromptBorder", line)
|
|
|
|
fg("TelescopeResultsBorder", line)
|