1
0
Fork 0
dot/.config/nvim/colors/basic.lua

383 lines
16 KiB
Lua
Raw Normal View History

2024-01-27 21:12:38 +01:00
-- basic neovim colorscheme template
--
-- A simple neovim colorscheme template that defines highlight groups
-- from a list of 8 colors.
-- colors ----------------------------------------------------------------------
local C = {
2024-05-05 17:34:33 +02:00
black = { cterm = 0, gui = "#000000" },
red = { cterm = 1, gui = "#fa3500" },
green = { cterm = 2, gui = "#009843" },
orange = { cterm = 3, gui = "#d06600" },
blue = { cterm = 4, gui = "#856cff" },
magenta = { cterm = 5, gui = "#ff1170" },
cyan = { cterm = 6, gui = "#008cca" },
white = { cterm = 7, gui = "#e2e2e2" },
bright_black = { cterm = 8, gui = "#848484" },
bright_red = { cterm = 9, gui = "#ff888e" },
bright_green = { cterm = 10, gui = "#00c55b" },
bright_orange = { cterm = 11, gui = "#ff8d48" },
bright_blue = { cterm = 12, gui = "#ac9fff" },
bright_magenta = { cterm = 13, gui = "#ffb1c0" },
bright_cyan = { cterm = 14, gui = "#92ccff" },
bright_white = { cterm = 15, gui = "#ffffff" },
2024-01-27 21:12:38 +01:00
}
2024-05-05 17:34:33 +02:00
vim.g.terminal_color_0 = "#000000"
vim.g.terminal_color_1 = "#fa3500"
vim.g.terminal_color_2 = "#009843"
vim.g.terminal_color_3 = "#d06600"
vim.g.terminal_color_4 = "#856cff"
vim.g.terminal_color_5 = "#ff1170"
vim.g.terminal_color_6 = "#008cca"
vim.g.terminal_color_7 = "#e2e2e2"
vim.g.terminal_color_8 = "#848484"
vim.g.terminal_color_9 = "#ff888e"
vim.g.terminal_color_10 = "#00c55b"
vim.g.terminal_color_11 = "#ff8d48"
vim.g.terminal_color_12 = "#ac9fff"
vim.g.terminal_color_13 = "#ffb1c0"
vim.g.terminal_color_14 = "#92ccff"
vim.g.terminal_color_15 = "#ffffff"
2024-01-27 21:12:38 +01:00
-- init ------------------------------------------------------------------------
vim.cmd.highlight("clear")
if vim.fn.exists("syntax_on") then
vim.cmd.syntax("reset")
end
vim.opt.background = "dark"
vim.g.colors_name = "basic"
-- highlights ------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local fg = C.white
local bg = C.black
local accent = C.magenta
local dimmed = C.blue
2024-01-27 21:12:38 +01:00
2024-04-11 19:15:09 +02:00
local nvim_set_hl = vim.api.nvim_set_hl
local function set_hl(group, def) nvim_set_hl(0, group, def) end
2024-01-27 21:12:38 +01:00
-- normal ----------------------------------------------------------------------
local normal_h = {}
set_hl("Normal", normal_h)
set_hl("NormalNC", normal_h)
-- tui -------------------------------------------------------------------------
local tui_normal_h = {}
2024-05-05 17:34:33 +02:00
local tui_accent_h = { ctermfg = accent.cterm, fg = accent.gui }
local tui_dimmed_h = { ctermfg = dimmed.cterm, fg = dimmed.gui }
2024-01-27 21:12:38 +01:00
set_hl("StatusLine", tui_dimmed_h)
set_hl("StatusLineNC", tui_dimmed_h)
set_hl("TabLine", tui_dimmed_h)
set_hl("TabLineFill", tui_dimmed_h)
set_hl("TabLineSel", tui_accent_h)
set_hl("WinBar", tui_accent_h)
set_hl("WinBarNC", tui_dimmed_h)
set_hl("WinSeparator", tui_dimmed_h)
set_hl("LineNr", tui_accent_h)
set_hl("LineNrAbove", tui_dimmed_h)
set_hl("LineNrBelow", tui_dimmed_h)
set_hl("SignColumn", tui_dimmed_h)
set_hl("FoldColumn", tui_dimmed_h)
set_hl("WildMenu", tui_accent_h)
-- float -----------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local float_normal_h = { ctermfg = bg.cterm,
fg = bg.gui,
ctermbg = fg.cterm,
bg = fg.gui }
local float_dimmed_h = { ctermfg = dimmed.cterm,
fg = dimmed.gui,
ctermbg = fg.cterm,
bg = fg.gui }
local float_accent_h = { ctermfg = accent.cterm,
fg = accent.gui,
ctermbg = fg.cterm,
bg = fg.gui }
2024-01-27 21:12:38 +01:00
set_hl("NormalFloat", float_normal_h)
2024-05-05 17:34:33 +02:00
set_hl("FloatBorder", float_dimmed_h)
2024-01-27 21:12:38 +01:00
set_hl("FloatTitle", float_accent_h)
-- menu ------------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local menu_normal_h = { ctermfg = accent.cterm,
fg = accent.gui,
ctermbg = fg.cterm,
bg = fg.gui }
local menu_accent_h = { ctermfg = accent.cterm,
fg = accent.gui,
ctermbg = fg.cterm,
bg = fg.gui,
reverse = true }
2024-01-27 21:12:38 +01:00
set_hl("Pmenu", menu_normal_h)
set_hl("PmenuSel", menu_accent_h)
set_hl("PmenuKind", menu_normal_h)
set_hl("PmenuKindSel", menu_accent_h)
set_hl("PmenuExtra", menu_normal_h)
set_hl("PmenuExtraSel", menu_accent_h)
2024-05-05 17:34:33 +02:00
set_hl("PmenuSbar", menu_normal_h)
set_hl("PmenuThumb", menu_accent_h)
2024-01-27 21:12:38 +01:00
-- messages --------------------------------------------------------------------
local message_normal_h = {}
2024-05-05 17:34:33 +02:00
local message_accent_h = { ctermfg = accent.cterm, fg = accent.gui }
local message_error_h = { ctermfg = C.red.cterm, fg = C.red.gui }
local message_warn_h = { ctermfg = C.orange.cterm, fg = C.orange.gui }
2024-01-27 21:12:38 +01:00
set_hl("MsgArea", message_normal_h)
set_hl("MsgSeparator", message_normal_h)
set_hl("ModeMsg", message_accent_h)
set_hl("MoreMsg", message_accent_h)
set_hl("WarningMsg", message_warn_h)
set_hl("ErrorMsg", message_error_h)
set_hl("Question", message_accent_h)
set_hl("Title", message_accent_h)
-- buffer ----------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local buffer_dimmed_h = { ctermfg = dimmed.cterm,
fg = dimmed.gui }
local buffer_dimmed_reverse_h = { ctermfg = dimmed.cterm,
fg = dimmed.gui,
reverse = true }
local buffer_accent_h = { ctermfg = accent.cterm,
fg = accent.gui }
set_hl("Conceal", buffer_dimmed_h)
set_hl("NonText", buffer_dimmed_h)
set_hl("EndOfBuffer", buffer_dimmed_h)
set_hl("Whitespace", buffer_dimmed_h)
set_hl("Folded", buffer_dimmed_h)
2024-01-27 21:12:38 +01:00
set_hl("SpecialKey", buffer_accent_h)
2024-06-12 00:48:33 +02:00
set_hl("ColorColumn", buffer_dimmed_reverse_h)
2024-01-27 21:12:38 +01:00
-- cursor ----------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local cursor_normal_h = { reverse = true }
2024-01-27 21:12:38 +01:00
set_hl("CursorLine", cursor_normal_h)
set_hl("CursorLineNr", cursor_normal_h)
set_hl("CursorLineSign", cursor_normal_h)
set_hl("CursorLineFold", cursor_normal_h)
set_hl("CursorColumn", cursor_normal_h)
set_hl("QuickFixLine", cursor_normal_h)
set_hl("Cursor", cursor_normal_h)
set_hl("lCursor", cursor_normal_h)
set_hl("CursorIM", cursor_normal_h)
set_hl("TermCursor", cursor_normal_h)
set_hl("TermCursorNC", cursor_normal_h)
-- match -----------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local match_normal_h = { ctermfg = C.black.cterm,
fg = C.black.gui,
ctermbg = C.orange.cterm,
bg = C.orange.gui }
local match_accent_h = { ctermfg = C.black.cterm,
fg = C.black.gui,
ctermbg = C.magenta.cterm,
bg = C.magenta.gui }
2024-06-12 00:48:33 +02:00
local match_parens_h = { ctermfg = C.magenta.cterm,
2024-05-05 17:34:33 +02:00
fg = C.magenta.gui,
ctermbg = C.white.cterm,
bg = C.white.gui }
2024-01-27 21:12:38 +01:00
set_hl("Search", match_normal_h)
set_hl("Substitute", match_normal_h)
2024-05-05 17:34:33 +02:00
set_hl("IncSearch", match_accent_h)
set_hl("CurSearch", match_accent_h)
2024-06-12 00:48:33 +02:00
set_hl("MatchParen", match_parens_h)
2024-01-27 21:12:38 +01:00
-- selection -------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
local selection_normal_h = { ctermfg = C.black.cterm,
fg = C.black.gui,
ctermbg = C.blue.cterm,
bg = C.blue.gui }
2024-01-27 21:12:38 +01:00
2024-05-05 17:34:33 +02:00
set_hl("Visual", selection_normal_h)
set_hl("Visualnos", selection_normal_h)
2024-01-27 21:12:38 +01:00
-- diff ------------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local diff_add_h = { ctermfg = C.green.cterm,
fg = C.green.gui }
local diff_change_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui }
local diff_delete_h = { ctermfg = C.red.cterm,
fg = C.red.gui }
local diff_text_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui,
underline = true }
2024-01-27 21:12:38 +01:00
set_hl("DiffAdd", diff_add_h)
set_hl("DiffChange", diff_change_h)
set_hl("DiffDelete", diff_delete_h)
set_hl("DiffText", diff_text_h)
-- spell -----------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local spell_error_h = { ctermfg = C.red.cterm,
fg = C.red.gui,
underline = true }
local spell_warn_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui,
underline = true }
2024-01-27 21:12:38 +01:00
set_hl("SpellBad", spell_error_h)
set_hl("SpellCap", spell_warn_h)
set_hl("SpellLocal", spell_warn_h)
set_hl("SpellRare", spell_warn_h)
-- diagnostic ------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local diagnostic_error_h = { ctermfg = C.red.cterm,
fg = C.red.gui }
local diagnostic_warn_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui }
local diagnostic_info_h = { ctermfg = C.blue.cterm,
fg = C.blue.gui }
local diagnostic_hint_h = { ctermfg = C.white.cterm,
fg = C.white.gui }
local diagnostic_ok_h = { ctermfg = C.green.cterm,
fg = C.green.gui }
local diagnostic_error_u_h = { ctermfg = C.red.cterm,
fg = C.red.gui,
underline = true }
local diagnostic_warn_u_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui,
underline = true }
local diagnostic_info_u_h = { ctermfg = C.blue.cterm,
fg = C.blue.gui,
underline = true }
local diagnostic_hint_u_h = { ctermfg = C.white.cterm,
fg = C.white.gui,
underline = true }
local diagnostic_ok_u_h = { ctermfg = C.green.cterm,
fg = C.green.gui,
underline = true }
2024-01-27 21:12:38 +01:00
set_hl("DiagnosticError", diagnostic_error_h)
set_hl("DiagnosticWarn", diagnostic_warn_h)
set_hl("DiagnosticInfo", diagnostic_info_h)
set_hl("DiagnosticHint", diagnostic_hint_h)
set_hl("DiagnosticOk", diagnostic_ok_h)
set_hl("DiagnosticVirtualError", diagnostic_error_h)
set_hl("DiagnosticVirtualWarn", diagnostic_warn_h)
set_hl("DiagnosticVirtualInfo", diagnostic_info_h)
set_hl("DiagnosticVirtualHint", diagnostic_hint_h)
set_hl("DiagnosticVirtualOk", diagnostic_ok_h)
set_hl("DiagnosticUnderlineError", diagnostic_error_u_h)
set_hl("DiagnosticUnderlineWarn", diagnostic_warn_u_h)
set_hl("DiagnosticUnderlineInfo", diagnostic_info_u_h)
set_hl("DiagnosticUnderlineHint", diagnostic_hint_u_h)
set_hl("DiagnosticUnderlineOk", diagnostic_ok_u_h)
set_hl("DiagnosticFloatingError", diagnostic_error_h)
set_hl("DiagnosticFloatingWarn", diagnostic_warn_h)
set_hl("DiagnosticFloatingInfo", diagnostic_info_h)
set_hl("DiagnosticFloatingHint", diagnostic_hint_h)
set_hl("DiagnosticFloatingOk", diagnostic_ok_h)
set_hl("DiagnosticSingError", diagnostic_error_h)
set_hl("DiagnosticSingWarn", diagnostic_warn_h)
set_hl("DiagnosticSingInfo", diagnostic_info_h)
set_hl("DiagnosticSingHint", diagnostic_hint_h)
set_hl("DiagnosticSingOk", diagnostic_ok_h)
set_hl("DiagnosticDeprecated", diagnostic_hint_u_h)
set_hl("DiagnosticUnnecessary", diagnostic_hint_u_h)
-- misc ------------------------------------------------------------------------
2024-05-05 17:34:33 +02:00
set_hl("Directory", { ctermfg = C.blue.cterm, fg = C.blue.gui })
2024-01-27 21:12:38 +01:00
-- syntax ----------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local syntax_normal_h = {}
local syntax_comment_h = { ctermfg = C.blue.cterm,
fg = C.blue.gui }
local syntax_constant_h = { ctermfg = C.red.cterm,
fg = C.red.gui }
2024-05-05 17:34:33 +02:00
local syntax_identifier_h = {}
2024-06-12 00:48:33 +02:00
local syntax_statement_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui }
local syntax_preproc_h = { ctermfg = C.magenta.cterm,
fg = C.magenta.gui }
local syntax_type_h = { ctermfg = C.green.cterm,
fg = C.green.gui }
local syntax_special_h = { ctermfg = C.orange.cterm,
fg = C.orange.gui }
local syntax_underline_h = { underline = true }
local syntax_ignore_h = { ctermfg = C.black.cterm,
fg = C.black.gui }
local syntax_error_h = { ctermfg = C.black.cterm,
fg = C.black.gui,
ctermbg = C.red.cterm,
bg = C.red.gui }
local syntax_warn_h = { ctermfg = C.black.cterm,
fg = C.black.gui,
ctermbg = C.orange.cterm,
bg = C.orange.gui }
local syntax_italic_h = { italic = true }
local syntax_bold_h = { bold = true }
local syntax_bolditalic_h = { bold = true,
italic = true }
local syntax_strike_h = { strikethrough = true }
2024-01-27 21:12:38 +01:00
set_hl("Comment", syntax_comment_h)
set_hl("Constant", syntax_constant_h)
set_hl("String", syntax_constant_h)
set_hl("Character", syntax_constant_h)
set_hl("Number", syntax_constant_h)
set_hl("Boolean", syntax_constant_h)
set_hl("Float", syntax_constant_h)
set_hl("Identifier", syntax_identifier_h)
set_hl("Function", syntax_identifier_h)
set_hl("Statement", syntax_statement_h)
set_hl("Conditional", syntax_statement_h)
set_hl("Repeat", syntax_statement_h)
set_hl("Label", syntax_statement_h)
set_hl("Operator", syntax_statement_h)
set_hl("Keyword", syntax_statement_h)
set_hl("Exception", syntax_statement_h)
set_hl("PreProc", syntax_preproc_h)
set_hl("Include", syntax_preproc_h)
set_hl("Define", syntax_preproc_h)
set_hl("Macro", syntax_preproc_h)
set_hl("PreCondit", syntax_preproc_h)
set_hl("Type", syntax_type_h)
set_hl("StorageClass", syntax_type_h)
set_hl("Structure", syntax_type_h)
set_hl("Typedef", syntax_type_h)
set_hl("Special", syntax_special_h)
set_hl("SpecialChar", syntax_special_h)
set_hl("Tag", syntax_special_h)
set_hl("Delimiter", syntax_special_h)
set_hl("SpecialComment", syntax_special_h)
set_hl("Debug", syntax_special_h)
set_hl("Underlined", syntax_underline_h)
set_hl("Ignore", syntax_ignore_h)
set_hl("Error", syntax_error_h)
set_hl("Todo", syntax_warn_h)
set_hl("Italic", syntax_italic_h)
set_hl("Bold", syntax_bold_h)
set_hl("BoldItalic", syntax_bolditalic_h)
2024-02-14 15:13:12 +01:00
set_hl("Strike", syntax_strike_h)
2024-01-27 21:12:38 +01:00
-- markdown --------------------------------------------------------------------
2024-06-12 00:48:33 +02:00
local markdown_label_h = { ctermfg = C.magenta.cterm,
fg = C.magenta.gui }
local markdown_delimiter_h = { ctermfg = C.blue.cterm,
fg = C.blue.gui }
local markdown_underline_h = { ctermfg = C.blue.cterm,
fg = C.blue.gui,
underline = true }
2024-01-27 21:12:38 +01:00
set_hl("markdownLabel", markdown_label_h)
2024-04-11 19:15:09 +02:00
set_hl("markdownHeadingDelimiter", markdown_delimiter_h)
set_hl("markdownItalicDelimiter", markdown_delimiter_h)
set_hl("markdownBoldDelimiter", markdown_delimiter_h)
set_hl("markdownBoldItalicDelimiter", markdown_delimiter_h)
set_hl("markdownStrikeDelimiter", markdown_delimiter_h)
set_hl("markdownCodeDelimiter", markdown_delimiter_h)
2024-05-23 09:38:56 +02:00
set_hl("markdownLinkTextDelimiter", markdown_delimiter_h)
set_hl("markdownLinkDelimiter", markdown_delimiter_h)
set_hl("markdownUrl", markdown_delimiter_h)
2024-04-11 19:15:09 +02:00
2024-06-12 00:48:33 +02:00
-- yaml ------------------------------------------------------------------------
2024-04-11 19:15:09 +02:00
set_hl("yamlBlockMappingKey", syntax_comment_h)
set_hl("yamlPlainScalar", syntax_constant_h)