2021-06-14 02:27:56 +00:00
|
|
|
local cmd = vim.cmd
|
|
|
|
|
2021-07-01 06:25:38 +00:00
|
|
|
local global_theme = "themes/" .. vim.g.nvchad_theme
|
2021-06-26 02:38:12 +00:00
|
|
|
local colors = require(global_theme)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
|
|
|
local white = colors.white
|
|
|
|
local darker_black = colors.darker_black
|
|
|
|
local black = colors.black
|
|
|
|
local black2 = colors.black2
|
|
|
|
local one_bg = colors.one_bg
|
|
|
|
local one_bg2 = colors.one_bg2
|
|
|
|
local grey = colors.grey
|
|
|
|
local grey_fg = colors.grey_fg
|
|
|
|
local red = colors.red
|
|
|
|
local line = colors.line
|
|
|
|
local green = colors.green
|
|
|
|
local nord_blue = colors.nord_blue
|
|
|
|
local blue = colors.blue
|
|
|
|
local yellow = colors.yellow
|
|
|
|
local purple = colors.purple
|
2021-08-16 13:34:09 +00:00
|
|
|
local pmenu_bg = colors.pmenu_bg
|
|
|
|
local folder_bg = colors.folder_bg
|
2021-06-14 02:27:56 +00:00
|
|
|
|
|
|
|
-- for guifg , bg
|
|
|
|
|
|
|
|
local function fg(group, color)
|
2021-08-16 07:49:09 +00:00
|
|
|
cmd("hi " .. group .. " guifg=" .. color)
|
2021-06-14 02:27:56 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
-- blankline
|
|
|
|
|
|
|
|
fg("IndentBlanklineChar", line)
|
|
|
|
|
|
|
|
-- misc --
|
|
|
|
fg("LineNr", grey)
|
2021-08-19 12:29:08 +00:00
|
|
|
|
|
|
|
-- Comments
|
|
|
|
local ui = require("utils").load_config().ui
|
|
|
|
|
|
|
|
if ui.italic_comments then
|
|
|
|
cmd("hi Comment gui=italic guifg=" .. grey_fg)
|
|
|
|
else
|
|
|
|
fg("Comment", grey_fg)
|
|
|
|
end
|
|
|
|
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("NvimInternalError", red)
|
|
|
|
fg("VertSplit", line)
|
|
|
|
fg("EndOfBuffer", black)
|
2021-08-19 12:29:08 +00:00
|
|
|
-- fg_bg("Visual",light_grey, colors.lightbg)
|
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)
|
|
|
|
|
|
|
|
-- inactive statuslines as thin splitlines
|
|
|
|
cmd("hi! StatusLineNC gui=underline guifg=" .. line)
|
|
|
|
|
|
|
|
-- line n.o
|
|
|
|
cmd "hi clear CursorLine"
|
|
|
|
fg("cursorlinenr", white)
|
|
|
|
|
|
|
|
-- git signs ---
|
|
|
|
fg_bg("DiffAdd", nord_blue, "none")
|
2021-07-17 08:45:14 +00:00
|
|
|
fg_bg("DiffChange", grey_fg, "none")
|
2021-06-14 02:27:56 +00:00
|
|
|
fg_bg("DiffModified", nord_blue, "none")
|
|
|
|
|
|
|
|
-- NvimTree
|
2021-08-16 13:34:09 +00:00
|
|
|
fg("NvimTreeFolderIcon", folder_bg)
|
|
|
|
fg("NvimTreeFolderName", folder_bg)
|
2021-08-12 17:40:00 +00:00
|
|
|
fg("NvimTreeGitDirty", red)
|
2021-06-26 02:35:24 +00:00
|
|
|
fg("NvimTreeOpenedFolderName", blue)
|
|
|
|
fg("NvimTreeEmptyFolderName", blue)
|
2021-06-14 02:27:56 +00:00
|
|
|
fg("NvimTreeIndentMarker", one_bg2)
|
|
|
|
fg("NvimTreeVertSplit", darker_black)
|
|
|
|
bg("NvimTreeVertSplit", darker_black)
|
2021-07-01 06:25:38 +00:00
|
|
|
fg("NvimTreeEndOfBuffer", darker_black)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-19 10:39:24 +00:00
|
|
|
cmd("hi NvimTreeRootFolder gui=underline guifg=" .. red)
|
2021-06-14 02:27:56 +00:00
|
|
|
bg("NvimTreeNormal", darker_black)
|
|
|
|
fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
|
2021-07-01 06:25:38 +00:00
|
|
|
fg_bg("NvimTreeWindowPicker", red, black2)
|
2021-06-14 02:27:56 +00:00
|
|
|
|
|
|
|
-- telescope
|
|
|
|
fg("TelescopeBorder", line)
|
|
|
|
fg("TelescopePromptBorder", line)
|
|
|
|
fg("TelescopeResultsBorder", line)
|
|
|
|
fg("TelescopePreviewBorder", grey)
|
|
|
|
|
|
|
|
-- LspDiagnostics ---
|
|
|
|
|
|
|
|
-- error / warnings
|
|
|
|
fg("LspDiagnosticsSignError", red)
|
|
|
|
fg("LspDiagnosticsVirtualTextError", red)
|
|
|
|
fg("LspDiagnosticsSignWarning", yellow)
|
|
|
|
fg("LspDiagnosticsVirtualTextWarning", yellow)
|
|
|
|
|
|
|
|
-- info
|
|
|
|
fg("LspDiagnosticsSignInformation", green)
|
|
|
|
fg("LspDiagnosticsVirtualTextInformation", green)
|
|
|
|
|
|
|
|
-- hint
|
|
|
|
fg("LspDiagnosticsSignHint", purple)
|
|
|
|
fg("LspDiagnosticsVirtualTextHint", purple)
|
|
|
|
|
|
|
|
-- dashboard
|
|
|
|
|
|
|
|
fg("DashboardHeader", grey_fg)
|
|
|
|
fg("DashboardCenter", grey_fg)
|
|
|
|
fg("DashboardShortcut", grey_fg)
|
2021-06-19 07:20:35 +00:00
|
|
|
fg("DashboardFooter", grey_fg)
|
2021-06-16 12:30:23 +00:00
|
|
|
|
2021-08-19 09:06:49 +00:00
|
|
|
if require("utils").load_config().ui.transparency then
|
|
|
|
bg("Normal", "NONE")
|
|
|
|
bg("Folded", "NONE")
|
|
|
|
fg("Folded", "NONE")
|
|
|
|
bg("NvimTreeNormal", "NONE")
|
|
|
|
bg("NvimTreeVertSplit", "NONE")
|
|
|
|
fg("NvimTreeVertSplit", grey)
|
|
|
|
bg("NvimTreeStatusLineNC", "NONE")
|
|
|
|
fg("Comment", grey)
|
|
|
|
end
|
2021-07-10 06:23:47 +00:00
|
|
|
|
2021-08-19 09:06:49 +00:00
|
|
|
-- For floating windows
|
2021-08-18 09:55:58 +00:00
|
|
|
bg("NormalFloat", one_bg)
|
2021-08-07 05:55:23 +00:00
|
|
|
fg("FloatBorder", blue)
|