2021-06-14 03:27:56 +01:00
|
|
|
local cmd = vim.cmd
|
|
|
|
|
2021-11-14 01:27:49 +00:00
|
|
|
local override = require("core.utils").load_config().ui.hl_override
|
2021-08-22 08:49:15 +01:00
|
|
|
local colors = require("colors").get()
|
2021-11-14 01:27:49 +00:00
|
|
|
local ui = require("core.utils").load_config().ui
|
2021-06-14 03:27:56 +01:00
|
|
|
|
|
|
|
local black = colors.black
|
|
|
|
local black2 = colors.black2
|
2021-08-22 08:49:15 +01:00
|
|
|
local blue = colors.blue
|
|
|
|
local darker_black = colors.darker_black
|
|
|
|
local folder_bg = colors.folder_bg
|
|
|
|
local green = colors.green
|
2021-06-14 03:27:56 +01:00
|
|
|
local grey = colors.grey
|
|
|
|
local grey_fg = colors.grey_fg
|
|
|
|
local line = colors.line
|
|
|
|
local nord_blue = colors.nord_blue
|
2021-08-22 08:49:15 +01:00
|
|
|
local one_bg = colors.one_bg
|
|
|
|
local one_bg2 = colors.one_bg2
|
2021-08-16 14:34:09 +01:00
|
|
|
local pmenu_bg = colors.pmenu_bg
|
2021-08-22 08:49:15 +01:00
|
|
|
local purple = colors.purple
|
|
|
|
local red = colors.red
|
|
|
|
local white = colors.white
|
|
|
|
local yellow = colors.yellow
|
2021-12-04 15:34:04 +00:00
|
|
|
local orange = colors.orange
|
2021-10-27 07:40:13 +01:00
|
|
|
local one_bg3 = colors.one_bg3
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-11-14 01:27:49 +00:00
|
|
|
-- functions for setting highlights
|
2021-11-09 00:51:27 +00:00
|
|
|
local fg = require("core.utils").fg
|
|
|
|
local fg_bg = require("core.utils").fg_bg
|
|
|
|
local bg = require("core.utils").bg
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-19 13:29:08 +01:00
|
|
|
-- Comments
|
|
|
|
if ui.italic_comments then
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("Comment", grey_fg .. " gui=italic")
|
2021-08-19 13:29:08 +01:00
|
|
|
else
|
|
|
|
fg("Comment", grey_fg)
|
|
|
|
end
|
|
|
|
|
2022-01-22 19:50:22 +00:00
|
|
|
-- Disable cursor line
|
2021-08-26 06:04:48 +01:00
|
|
|
cmd "hi clear CursorLine"
|
|
|
|
-- Line number
|
|
|
|
fg("cursorlinenr", white)
|
2021-08-22 08:49:15 +01:00
|
|
|
|
|
|
|
-- same it bg, so it doesn't appear
|
2021-06-14 03:27:56 +01:00
|
|
|
fg("EndOfBuffer", black)
|
2021-08-22 08:49:15 +01:00
|
|
|
|
|
|
|
-- For floating windows
|
|
|
|
fg("FloatBorder", blue)
|
2021-12-04 15:34:04 +00:00
|
|
|
bg("NormalFloat", darker_black)
|
2021-06-14 03:27:56 +01:00
|
|
|
|
|
|
|
-- Pmenu
|
|
|
|
bg("Pmenu", one_bg)
|
|
|
|
bg("PmenuSbar", one_bg2)
|
2021-08-16 14:34:09 +01:00
|
|
|
bg("PmenuSel", pmenu_bg)
|
2021-06-14 03:27:56 +01:00
|
|
|
bg("PmenuThumb", nord_blue)
|
2021-10-09 05:33:49 +01:00
|
|
|
fg("CmpItemAbbr", white)
|
|
|
|
fg("CmpItemAbbrMatch", white)
|
|
|
|
fg("CmpItemKind", white)
|
|
|
|
fg("CmpItemMenu", white)
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-22 08:49:15 +01:00
|
|
|
-- misc
|
2021-10-17 06:58:47 +01:00
|
|
|
|
|
|
|
-- inactive statuslines as thin lines
|
2021-10-27 07:40:13 +01:00
|
|
|
fg("StatusLineNC", one_bg3 .. " gui=underline")
|
2021-10-17 06:58:47 +01:00
|
|
|
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("LineNr", grey)
|
|
|
|
fg("NvimInternalError", red)
|
2021-09-02 09:11:43 +01:00
|
|
|
fg("VertSplit", one_bg2)
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-22 08:49:15 +01:00
|
|
|
if ui.transparency then
|
|
|
|
bg("Normal", "NONE")
|
|
|
|
bg("Folded", "NONE")
|
|
|
|
fg("Folded", "NONE")
|
|
|
|
fg("Comment", grey)
|
|
|
|
end
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-26 06:04:48 +01:00
|
|
|
-- [[ Plugin Highlights
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-26 06:04:48 +01:00
|
|
|
-- Dashboard
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("DashboardCenter", grey_fg)
|
|
|
|
fg("DashboardFooter", grey_fg)
|
|
|
|
fg("DashboardHeader", grey_fg)
|
|
|
|
fg("DashboardShortcut", grey_fg)
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-26 06:04:48 +01:00
|
|
|
-- Git signs
|
2021-11-17 05:30:57 +00:00
|
|
|
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")
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-08-26 06:04:48 +01:00
|
|
|
-- Indent blankline plugin
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("IndentBlanklineChar", line)
|
2022-02-10 19:27:26 +00:00
|
|
|
fg("IndentBlanklineSpaceChar", line)
|
2021-06-14 03:27:56 +01:00
|
|
|
|
2021-12-04 17:36:07 +00:00
|
|
|
-- Lsp diagnostics
|
2021-08-26 06:04:48 +01:00
|
|
|
|
2021-12-04 17:36:07 +00:00
|
|
|
fg("DiagnosticHint", purple)
|
|
|
|
fg("DiagnosticError", red)
|
|
|
|
fg("DiagnosticWarn", yellow)
|
|
|
|
fg("DiagnosticInformation", green)
|
2021-08-26 06:04:48 +01:00
|
|
|
|
|
|
|
-- NvimTree
|
2021-12-25 05:27:25 +00:00
|
|
|
fg("NvimTreeEmptyFolderName", folder_bg)
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("NvimTreeEndOfBuffer", darker_black)
|
|
|
|
fg("NvimTreeFolderIcon", folder_bg)
|
|
|
|
fg("NvimTreeFolderName", folder_bg)
|
|
|
|
fg("NvimTreeGitDirty", red)
|
|
|
|
fg("NvimTreeIndentMarker", one_bg2)
|
|
|
|
bg("NvimTreeNormal", darker_black)
|
2021-10-10 03:11:47 +01:00
|
|
|
bg("NvimTreeNormalNC", darker_black)
|
2021-12-25 05:27:25 +00:00
|
|
|
fg("NvimTreeOpenedFolderName", folder_bg)
|
2021-08-22 08:49:15 +01:00
|
|
|
fg("NvimTreeRootFolder", red .. " gui=underline") -- enable underline for root folder in nvim tree
|
|
|
|
fg_bg("NvimTreeStatuslineNc", darker_black, darker_black)
|
2022-02-04 06:49:16 +00:00
|
|
|
fg_bg("NvimTreeVertSplit", darker_black, darker_black)
|
2021-08-22 08:49:15 +01:00
|
|
|
fg_bg("NvimTreeWindowPicker", red, black2)
|
2021-08-26 06:04:48 +01:00
|
|
|
|
2021-11-14 01:27:49 +00:00
|
|
|
-- Telescope
|
2021-12-04 15:12:44 +00:00
|
|
|
fg_bg("TelescopeBorder", darker_black, darker_black)
|
|
|
|
fg_bg("TelescopePromptBorder", black2, black2)
|
|
|
|
|
|
|
|
fg_bg("TelescopePromptNormal", white, black2)
|
|
|
|
fg_bg("TelescopePromptPrefix", red, black2)
|
|
|
|
|
|
|
|
bg("TelescopeNormal", darker_black)
|
|
|
|
|
|
|
|
fg_bg("TelescopePreviewTitle", black, green)
|
|
|
|
fg_bg("TelescopePromptTitle", black, red)
|
2021-12-04 15:34:04 +00:00
|
|
|
fg_bg("TelescopeResultsTitle", darker_black, darker_black)
|
2021-12-04 15:12:44 +00:00
|
|
|
|
|
|
|
bg("TelescopeSelection", black2)
|
2021-11-14 01:27:49 +00:00
|
|
|
|
2021-12-04 15:34:04 +00:00
|
|
|
-- keybinds cheatsheet
|
|
|
|
|
|
|
|
fg_bg("CheatsheetBorder", black, black)
|
|
|
|
bg("CheatsheetSectionContent", black)
|
|
|
|
fg("CheatsheetHeading", white)
|
|
|
|
|
|
|
|
local section_title_colors = {
|
|
|
|
white,
|
|
|
|
blue,
|
|
|
|
red,
|
|
|
|
green,
|
|
|
|
yellow,
|
|
|
|
purple,
|
|
|
|
orange,
|
|
|
|
}
|
|
|
|
for i, color in ipairs(section_title_colors) do
|
|
|
|
vim.cmd("highlight CheatsheetTitle" .. i .. " guibg = " .. color .. " guifg=" .. black)
|
|
|
|
end
|
|
|
|
|
2021-08-26 06:04:48 +01:00
|
|
|
-- Disable some highlight in nvim tree if transparency enabled
|
2021-08-22 08:49:15 +01:00
|
|
|
if ui.transparency then
|
2021-12-04 16:08:30 +00:00
|
|
|
bg("NormalFloat", "NONE")
|
2021-08-19 10:06:49 +01:00
|
|
|
bg("NvimTreeNormal", "NONE")
|
2021-11-24 14:38:11 +00:00
|
|
|
bg("NvimTreeNormalNC", "NONE")
|
2021-08-22 08:49:15 +01:00
|
|
|
bg("NvimTreeStatusLineNC", "NONE")
|
2022-02-04 06:49:16 +00:00
|
|
|
fg_bg("NvimTreeVertSplit", grey, "NONE")
|
2021-12-04 16:08:30 +00:00
|
|
|
|
|
|
|
-- telescope
|
|
|
|
bg("TelescopeBorder", "NONE")
|
|
|
|
bg("TelescopePrompt", "NONE")
|
|
|
|
bg("TelescopeResults", "NONE")
|
|
|
|
bg("TelescopePromptBorder", "NONE")
|
|
|
|
bg("TelescopePromptNormal", "NONE")
|
|
|
|
bg("TelescopeNormal", "NONE")
|
|
|
|
bg("TelescopePromptPrefix", "NONE")
|
|
|
|
fg("TelescopeBorder", one_bg)
|
2021-12-09 00:29:15 +00:00
|
|
|
fg_bg("TelescopeResultsTitle", black, blue)
|
2021-11-17 05:30:57 +00:00
|
|
|
end
|
2021-11-09 00:51:27 +00:00
|
|
|
|
|
|
|
if #override ~= 0 then
|
|
|
|
require(override)
|
|
|
|
end
|