165 lines
6 KiB
Lua
165 lines
6 KiB
Lua
local c = {
|
|
red = "#cc5c5c",
|
|
green = "#97bd5e",
|
|
yellow = "#f0c767",
|
|
blue = "#789ebf",
|
|
purple = "#a97fb3",
|
|
cyan = "#82bfb3",
|
|
black = "#14171d",
|
|
darkgray = "#2c2b3b",
|
|
gray = "#4d4754",
|
|
lightgray = "#ada0a8",
|
|
white = "#c7c6c3",
|
|
}
|
|
|
|
|
|
c.fg = c.white
|
|
c.bg = "NONE"
|
|
|
|
c.comment_fg = c.lightgray
|
|
c.gutter_bg = c.darkgray
|
|
c.gutter_fg = c.lightgray
|
|
|
|
c.selection = c.lightgray
|
|
c.vertsplit = c.darkgray
|
|
|
|
local hl = vim.api.nvim_set_hl
|
|
local theme = {}
|
|
|
|
theme.set_highlights = function()
|
|
-- UI
|
|
hl(0, "Normal", { fg = c.fg, bg = c.bg })
|
|
hl(0, "NonText", { fg = c.fg, bg = c.bg })
|
|
|
|
hl(0, "Cursor", { fg = c.black, bg = c.blue })
|
|
hl(0, "CursorColumn", { fg = c.black, bg = c.blue })
|
|
hl(0, "CursorLine", { fg = c.black, bg = c.blue })
|
|
|
|
hl(0, "LineNr", { fg = c.gutter_fg, bg = c.gutter_bg })
|
|
hl(0, "CursorLineNr", { fg = c.fg, bg = "NONE" })
|
|
|
|
hl(0, "DiffAdd", { fg = c.green, bg = "NONE" })
|
|
hl(0, "DiffChange", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "DiffDelete", { fg = c.red, bg = "NONE" })
|
|
hl(0, "DiffText", { fg = c.blue, bg = "NONE" })
|
|
|
|
hl(0, "IncSearch", { fg = c.yellow, bg = c.bg, reverse = true })
|
|
hl(0, "Search", { fg = c.yellow, bg = c.bg, reverse = true })
|
|
|
|
hl(0, "ErrorMsg", { fg = c.red, bg = "NONE" })
|
|
hl(0, "ModeMsg", { fg = c.lightgray, bg = "NONE" })
|
|
hl(0, "MoreMsg", { fg = c.lightgray, bg = "NONE" })
|
|
hl(0, "WarningMsg", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Question", { fg = c.purple, bg = "NONE" })
|
|
|
|
hl(0, "Pmenu", { fg = c.fg, bg = c.darkgray })
|
|
hl(0, "PmenuSel", { fg = c.fg, bg = c.blue })
|
|
hl(0, "PmenuSbar", { fg = c.fg, bg = c.selection })
|
|
hl(0, "PmenuThumb", { fg = c.fg, bg = c.gray })
|
|
|
|
hl(0, "SpellBad", { fg = c.red, bg = "NONE" })
|
|
hl(0, "SpellCap", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "SpellLocal", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "SpellRare", { fg = c.yellow, bg = "NONE" })
|
|
|
|
hl(0, "StatusLine", { fg = c.fg, bg = c.darkgray })
|
|
hl(0, "StatusLineNC", { fg = c.cyan, bg = c.darkgray })
|
|
hl(0, "TabLine", { fg = c.fg, bg = c.darkgray })
|
|
hl(0, "TabLineFill", { fg = c.fg, bg = c.darkgray })
|
|
hl(0, "TabLineSel", { fg = c.fg, bg = c.bg })
|
|
|
|
hl(0, "Visual", { fg = c.selection, bg = c.bg, reverse = true })
|
|
hl(0, "VisualNOS", { fg = c.selection, bg = c.bg, reverse = true })
|
|
|
|
hl(0, "ColorColumn", { fg = "NONE", bg = c.color_col })
|
|
hl(0, "Conceal", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Directory", { fg = c.blue, bg = "NONE" })
|
|
hl(0, "VertSplit", { fg = c.vertsplit, bg = c.vertsplit })
|
|
hl(0, "Folded", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "FoldColumn", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "SignColumn", { fg = c.fg, bg = "NONE" })
|
|
|
|
hl(0, "MatchParen", { fg = c.blue, bg = "NONE", underline = true })
|
|
hl(0, "SpecialKey", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Title", { fg = c.green, bg = "NONE" })
|
|
hl(0, "WildMenu", { fg = c.fg, bg = "NONE" })
|
|
|
|
-- Syntax
|
|
hl(0, "Comment", { fg = c.comment_fg, bg = "NONE", italic = true })
|
|
hl(0, "Constant", { fg = c.cyan, bg = "NONE" })
|
|
hl(0, "String", { fg = c.green, bg = "NONE" })
|
|
hl(0, "Character", { fg = c.green, bg = "NONE" })
|
|
hl(0, "Number", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Boolean", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Float", { fg = c.yellow, bg = "NONE" })
|
|
|
|
hl(0, "Identifier", { fg = c.fg, bg = "NONE", italic = true })
|
|
hl(0, "Function", { fg = c.blue, bg = "NONE" })
|
|
hl(0, "Statement", { fg = c.purple, bg = "NONE" })
|
|
|
|
hl(0, "Conditional", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "Repeat", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "Label", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "Operator", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Keyword", { fg = c.red, bg = "NONE" })
|
|
hl(0, "Exception", { fg = c.purple, bg = "NONE" })
|
|
|
|
hl(0, "PreProc", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Include", { fg = c.blue, bg = "NONE" })
|
|
hl(0, "Define", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "Macro", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "PreCondit", { fg = c.yellow, bg = "NONE" })
|
|
|
|
hl(0, "Type", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "StorageClass", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Structure", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "Typedef", { fg = c.yellow, bg = "NONE" })
|
|
|
|
hl(0, "Special", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "SpecialChar", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Tag", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Delimiter", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "SpecialComment", { fg = c.fg, bg = "NONE", italic = true })
|
|
hl(0, "Debug", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "Underlined", { fg = c.fg, bg = "NONE", underline = true })
|
|
hl(0, "Ignore", { fg = c.lightgray, bg = "NONE" })
|
|
hl(0, "Error", { fg = c.red, bg = c.gutter_bg })
|
|
hl(0, "Todo", { fg = c.purple, bg = "NONE" })
|
|
|
|
-- GitGutter
|
|
hl(0, "GitGutterAdd", { fg = c.green, bg = c.gutter_bg })
|
|
hl(0, "GitGutterDelete", { fg = c.red, bg = c.gutter_bg })
|
|
hl(0, "GitGutterChange", { fg = c.yellow, bg = c.gutter_bg })
|
|
hl(0, "GitGutterChangeDelete", { fg = c.red, bg = c.gutter_bg })
|
|
-- Fugitive
|
|
hl(0, "diffAdded", { fg = c.green, bg = "NONE" })
|
|
hl(0, "diffRemoved", { fg = c.red, bg = "NONE" })
|
|
|
|
-- Git
|
|
hl(0, "gitcommitComment", { fg = c.comment_fg, bg = "NONE" })
|
|
hl(0, "gitcommitUnmerged", { fg = c.red, bg = "NONE" })
|
|
hl(0, "gitcommitOnBranch", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "gitcommitBranch", { fg = c.purple, bg = "NONE" })
|
|
hl(0, "gitcommitDiscardedType", { fg = c.red, bg = "NONE" })
|
|
hl(0, "gitcommitSelectedType", { fg = c.green, bg = "NONE" })
|
|
hl(0, "gitcommitHeader", { fg = c.fg, bg = "NONE" })
|
|
hl(0, "gitcommitUntrackedFile", { fg = c.cyan, bg = "NONE" })
|
|
hl(0, "gitcommitDiscardedFile", { fg = c.red, bg = "NONE" })
|
|
hl(0, "gitcommitSelectedFile", { fg = c.green, bg = "NONE" })
|
|
hl(0, "gitcommitUnmergedFile", { fg = c.yellow, bg = "NONE" })
|
|
hl(0, "gitcommitFile", { fg = c.fg, bg = "NONE" })
|
|
end
|
|
|
|
vim.cmd("let $NVIM_TUI_ENABLE_TRUE_COLOR=1")
|
|
vim.cmd("let &t_8f = \"\\<Esc>[38:2:%lu:%lu:%lum\"")
|
|
vim.cmd("let &t_8b = \"\\<Esc>[48:2:%lu:%lu:%lum\"")
|
|
vim.opt.termguicolors = true
|
|
|
|
vim.cmd("hi clear")
|
|
vim.opt.background = "dark"
|
|
if vim.fn.exists("syntax_on") then
|
|
vim.cmd("syntax reset")
|
|
end
|
|
|
|
vim.g.colors_name = "tricolors"
|
|
theme.set_highlights()
|