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-11-14 01:27:49 +00:00
|
|
|
local ui = require("core.utils").load_config().ui
|
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
|
2022-02-20 06:14:43 +00:00
|
|
|
local light_grey = colors.light_grey
|
2021-06-14 02:27:56 +00:00
|
|
|
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-12-04 15:34:04 +00:00
|
|
|
local orange = colors.orange
|
2021-08-19 12:29:08 +00:00
|
|
|
|
2022-01-22 19:50:22 +00:00
|
|
|
-- Disable cursor line
|
2021-08-26 05:04:48 +00:00
|
|
|
cmd "hi clear CursorLine"
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2022-05-01 15:54:33 +00:00
|
|
|
-- highlight groups & colors
|
|
|
|
local hl_cols = {
|
|
|
|
|
|
|
|
Comment = { fg = grey_fg },
|
|
|
|
|
|
|
|
-- line numbers
|
|
|
|
CursorLineNr = { fg = white },
|
|
|
|
LineNr = { fg = grey },
|
|
|
|
|
|
|
|
-- those ugly ~'s
|
|
|
|
EndOfBuffer = { fg = black },
|
|
|
|
|
|
|
|
-- floating windows
|
|
|
|
FloatBorder = { fg = blue },
|
|
|
|
NormalFloat = { bg = darker_black },
|
|
|
|
|
|
|
|
-- Pmenu i.e completion menu
|
|
|
|
Pmenu = { bg = one_bg },
|
|
|
|
PmenuSbar = { bg = one_bg2 },
|
|
|
|
PmenuSel = { bg = pmenu_bg, fg = black },
|
|
|
|
PmenuThumb = { bg = nord_blue },
|
|
|
|
|
|
|
|
-- nvim cmp
|
|
|
|
CmpItemAbbr = { fg = white },
|
|
|
|
CmpItemAbbrMatch = { fg = white },
|
|
|
|
CmpItemKind = { fg = white },
|
|
|
|
CmpItemMenu = { fg = white },
|
|
|
|
|
|
|
|
NvimInternalError = { fg = red },
|
|
|
|
WinSeparator = { fg = one_bg2 },
|
|
|
|
|
|
|
|
-- Dashboard i.e alpha.nvim
|
|
|
|
AlphaHeader = { fg = grey_fg },
|
|
|
|
AlphaButtons = { fg = light_grey },
|
|
|
|
|
|
|
|
-- Gitsigns.nvim
|
|
|
|
DiffAdd = {
|
|
|
|
fg = blue,
|
|
|
|
bg = "NONE",
|
|
|
|
},
|
|
|
|
|
|
|
|
DiffChange = {
|
|
|
|
fg = light_grey,
|
|
|
|
bg = "NONE",
|
|
|
|
},
|
|
|
|
|
|
|
|
DiffChangeDelete = {
|
|
|
|
fg = red,
|
|
|
|
bg = "NONE",
|
|
|
|
},
|
|
|
|
|
|
|
|
DiffModified = {
|
|
|
|
fg = orange,
|
|
|
|
bg = "NONE",
|
|
|
|
},
|
|
|
|
|
|
|
|
DiffDelete = {
|
|
|
|
fg = red,
|
|
|
|
bg = "NONE",
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Indent blankline
|
|
|
|
IndentBlanklineChar = { fg = line },
|
|
|
|
IndentBlanklineSpaceChar = { fg = line },
|
|
|
|
|
|
|
|
-- Lsp Diagnostics
|
|
|
|
DiagnosticHint = { fg = purple },
|
|
|
|
DiagnosticError = { fg = red },
|
|
|
|
DiagnosticWarn = { fg = yellow },
|
|
|
|
DiagnosticInformation = { fg = green },
|
|
|
|
|
|
|
|
-- NvimTree
|
|
|
|
NvimTreeEmptyFolderName = { fg = folder_bg },
|
|
|
|
NvimTreeEndOfBuffer = { fg = darker_black },
|
|
|
|
NvimTreeFolderIcon = { fg = folder_bg },
|
|
|
|
NvimTreeFolderName = { fg = folder_bg },
|
|
|
|
NvimTreeGitDirty = { fg = red },
|
|
|
|
NvimTreeIndentMarker = { fg = one_bg2 },
|
|
|
|
NvimTreeNormal = { bg = darker_black },
|
|
|
|
NvimTreeNormalNC = { bg = darker_black },
|
|
|
|
NvimTreeOpenedFolderName = { fg = folder_bg },
|
|
|
|
|
|
|
|
NvimTreeWinSeparator = {
|
|
|
|
fg = darker_black,
|
|
|
|
bg = darker_black,
|
|
|
|
},
|
|
|
|
|
|
|
|
NvimTreeWindowPicker = {
|
|
|
|
fg = red,
|
|
|
|
bg = black2,
|
|
|
|
},
|
|
|
|
|
|
|
|
-- Telescope
|
|
|
|
TelescopeBorder = {
|
|
|
|
fg = darker_black,
|
|
|
|
bg = darker_black,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopePromptBorder = {
|
|
|
|
fg = black2,
|
|
|
|
bg = black2,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopePromptNormal = {
|
|
|
|
fg = white,
|
|
|
|
bg = black2,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopePromptPrefix = {
|
|
|
|
fg = red,
|
|
|
|
bg = black2,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopeNormal = { bg = darker_black },
|
|
|
|
|
|
|
|
TelescopePreviewTitle = {
|
|
|
|
fg = black,
|
|
|
|
bg = green,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopePromptTitle = {
|
|
|
|
fg = black,
|
|
|
|
bg = red,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopeResultsTitle = {
|
|
|
|
fg = darker_black,
|
|
|
|
bg = darker_black,
|
|
|
|
},
|
|
|
|
|
|
|
|
TelescopeSelection = { bg = black2 },
|
|
|
|
}
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2021-08-22 07:49:15 +00:00
|
|
|
if ui.transparency then
|
2022-05-01 15:54:33 +00:00
|
|
|
local hl_groups = {
|
|
|
|
"NormalFloat",
|
|
|
|
"Normal",
|
|
|
|
"Folded",
|
|
|
|
"NvimTreeNormal",
|
|
|
|
"NvimTreeNormalNC",
|
|
|
|
"TelescopeNormal",
|
|
|
|
"TelescopePrompt",
|
|
|
|
"TelescopeResults",
|
|
|
|
"TelescopeBorder",
|
|
|
|
"TelescopePromptBorder",
|
|
|
|
"TelescopePromptNormal",
|
|
|
|
"TelescopePromptPrefix",
|
|
|
|
}
|
|
|
|
|
|
|
|
for index, _ in ipairs(hl_groups) do
|
|
|
|
hl_cols[hl_groups[index]] = {
|
|
|
|
bg = "NONE",
|
|
|
|
}
|
|
|
|
end
|
|
|
|
|
|
|
|
hl_cols.NvimTreeWinSeparator = {
|
|
|
|
fg = grey,
|
|
|
|
bg = "NONE",
|
|
|
|
}
|
|
|
|
|
|
|
|
hl_cols.TelescopeResultsTitle = {
|
|
|
|
fg = black,
|
|
|
|
bg = blue,
|
|
|
|
}
|
2021-08-22 07:49:15 +00:00
|
|
|
end
|
2021-06-14 02:27:56 +00:00
|
|
|
|
2022-05-01 15:54:33 +00:00
|
|
|
local utils = require "core.utils"
|
|
|
|
local user_highlights = utils.load_config().ui.hl_override
|
|
|
|
|
|
|
|
-- override user highlights if there are any
|
|
|
|
hl_cols = vim.tbl_deep_extend("force", hl_cols, user_highlights)
|
|
|
|
|
|
|
|
for hl, col in pairs(hl_cols) do
|
|
|
|
vim.api.nvim_set_hl(0, hl, col)
|
2021-11-17 05:30:57 +00:00
|
|
|
end
|