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

368 lines
15 KiB
Lua
Raw Normal View History

2024-07-05 17:00:27 +02:00
-- Name: basic
-- Description: a basic colorscheme
-- Author: urosm <urosm@kompot.si>
-- Maintainer: urosm <https://git.kompot.si/urosm/dot/src/branch/main/.config/nvim/colors/basic.lua>
-- Website: https://git.kompot.si/urosm/dot/src/branch/main/.config/nvim/colors/basic.lua
-- License: Same as Vim
-- Last Updated: 2024 Jun 19
-- A simple neovim colorscheme that defines highlight groups from a list of 8
-- colors.
-- init ------------------------------------------------------------------------
vim.cmd.highlight("clear")
vim.g.colors_name = "basic"
local hi = function(name, val) vim.api.nvim_set_hl(0, name, val) end
2024-01-27 21:12:38 +01:00
-- 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
}
-- 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
-- normal ----------------------------------------------------------------------
local normal_h = {}
2024-07-05 17:00:27 +02:00
hi("Normal", normal_h)
hi("NormalNC", normal_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("StatusLine", tui_dimmed_h)
hi("StatusLineNC", tui_dimmed_h)
hi("TabLine", tui_dimmed_h)
hi("TabLineFill", tui_dimmed_h)
hi("TabLineSel", tui_accent_h)
hi("WinBar", tui_accent_h)
hi("WinBarNC", tui_dimmed_h)
hi("WinSeparator", tui_dimmed_h)
hi("LineNr", tui_accent_h)
hi("LineNrAbove", tui_dimmed_h)
hi("LineNrBelow", tui_dimmed_h)
hi("SignColumn", tui_dimmed_h)
hi("FoldColumn", tui_dimmed_h)
hi("WildMenu", tui_accent_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("NormalFloat", float_normal_h)
hi("FloatBorder", float_dimmed_h)
hi("FloatTitle", float_accent_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("Pmenu", menu_normal_h)
hi("PmenuSel", menu_accent_h)
hi("PmenuKind", menu_normal_h)
hi("PmenuKindSel", menu_accent_h)
hi("PmenuExtra", menu_normal_h)
hi("PmenuExtraSel", menu_accent_h)
hi("PmenuSbar", menu_normal_h)
hi("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
2024-07-05 17:00:27 +02:00
hi("MsgArea", message_normal_h)
hi("MsgSeparator", message_normal_h)
hi("ModeMsg", message_accent_h)
hi("MoreMsg", message_accent_h)
hi("WarningMsg", message_warn_h)
hi("ErrorMsg", message_error_h)
hi("Question", message_accent_h)
hi("Title", message_accent_h)
2024-01-27 21:12:38 +01:00
-- 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 }
2024-07-05 17:00:27 +02:00
hi("Conceal", buffer_dimmed_h)
hi("NonText", buffer_dimmed_h)
hi("EndOfBuffer", buffer_dimmed_h)
hi("Whitespace", buffer_dimmed_h)
hi("Folded", buffer_dimmed_h)
hi("SpecialKey", buffer_accent_h)
hi("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
2024-07-05 17:00:27 +02:00
hi("CursorLine", cursor_normal_h)
hi("CursorLineNr", cursor_normal_h)
hi("CursorLineSign", cursor_normal_h)
hi("CursorLineFold", cursor_normal_h)
hi("CursorColumn", cursor_normal_h)
hi("QuickFixLine", cursor_normal_h)
hi("Cursor", cursor_normal_h)
hi("lCursor", cursor_normal_h)
hi("CursorIM", cursor_normal_h)
hi("TermCursor", cursor_normal_h)
hi("TermCursorNC", cursor_normal_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("Search", match_normal_h)
hi("Substitute", match_normal_h)
hi("IncSearch", match_accent_h)
hi("CurSearch", match_accent_h)
hi("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-07-05 17:00:27 +02:00
hi("Visual", selection_normal_h)
hi("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
2024-07-05 17:00:27 +02:00
hi("DiffAdd", diff_add_h)
hi("DiffChange", diff_change_h)
hi("DiffDelete", diff_delete_h)
hi("DiffText", diff_text_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("SpellBad", spell_error_h)
hi("SpellCap", spell_warn_h)
hi("SpellLocal", spell_warn_h)
hi("SpellRare", spell_warn_h)
2024-01-27 21:12:38 +01:00
-- 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
2024-07-05 17:00:27 +02:00
hi("DiagnosticError", diagnostic_error_h)
hi("DiagnosticWarn", diagnostic_warn_h)
hi("DiagnosticInfo", diagnostic_info_h)
hi("DiagnosticHint", diagnostic_hint_h)
hi("DiagnosticOk", diagnostic_ok_h)
hi("DiagnosticVirtualError", diagnostic_error_h)
hi("DiagnosticVirtualWarn", diagnostic_warn_h)
hi("DiagnosticVirtualInfo", diagnostic_info_h)
hi("DiagnosticVirtualHint", diagnostic_hint_h)
hi("DiagnosticVirtualOk", diagnostic_ok_h)
hi("DiagnosticUnderlineError", diagnostic_error_u_h)
hi("DiagnosticUnderlineWarn", diagnostic_warn_u_h)
hi("DiagnosticUnderlineInfo", diagnostic_info_u_h)
hi("DiagnosticUnderlineHint", diagnostic_hint_u_h)
hi("DiagnosticUnderlineOk", diagnostic_ok_u_h)
hi("DiagnosticFloatingError", diagnostic_error_h)
hi("DiagnosticFloatingWarn", diagnostic_warn_h)
hi("DiagnosticFloatingInfo", diagnostic_info_h)
hi("DiagnosticFloatingHint", diagnostic_hint_h)
hi("DiagnosticFloatingOk", diagnostic_ok_h)
hi("DiagnosticSingError", diagnostic_error_h)
hi("DiagnosticSingWarn", diagnostic_warn_h)
hi("DiagnosticSingInfo", diagnostic_info_h)
hi("DiagnosticSingHint", diagnostic_hint_h)
hi("DiagnosticSingOk", diagnostic_ok_h)
hi("DiagnosticDeprecated", diagnostic_hint_u_h)
hi("DiagnosticUnnecessary", diagnostic_hint_u_h)
2024-01-27 21:12:38 +01:00
-- misc ------------------------------------------------------------------------
2024-07-05 17:00:27 +02:00
hi("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
2024-07-05 17:00:27 +02:00
hi("Comment", syntax_comment_h)
hi("Constant", syntax_constant_h)
hi("String", syntax_constant_h)
hi("Character", syntax_constant_h)
hi("Number", syntax_constant_h)
hi("Boolean", syntax_constant_h)
hi("Float", syntax_constant_h)
hi("Identifier", syntax_identifier_h)
hi("Function", syntax_identifier_h)
hi("Statement", syntax_statement_h)
hi("Conditional", syntax_statement_h)
hi("Repeat", syntax_statement_h)
hi("Label", syntax_statement_h)
hi("Operator", syntax_statement_h)
hi("Keyword", syntax_statement_h)
hi("Exception", syntax_statement_h)
hi("PreProc", syntax_preproc_h)
hi("Include", syntax_preproc_h)
hi("Define", syntax_preproc_h)
hi("Macro", syntax_preproc_h)
hi("PreCondit", syntax_preproc_h)
hi("Type", syntax_type_h)
hi("StorageClass", syntax_type_h)
hi("Structure", syntax_type_h)
hi("Typedef", syntax_type_h)
hi("Special", syntax_special_h)
hi("SpecialChar", syntax_special_h)
hi("Tag", syntax_special_h)
hi("Delimiter", syntax_special_h)
hi("SpecialComment", syntax_special_h)
hi("Debug", syntax_special_h)
hi("Underlined", syntax_underline_h)
hi("Ignore", syntax_ignore_h)
hi("Error", syntax_error_h)
hi("Todo", syntax_warn_h)
hi("Italic", syntax_italic_h)
hi("Bold", syntax_bold_h)
hi("BoldItalic", syntax_bolditalic_h)
hi("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
2024-07-05 17:00:27 +02:00
hi("markdownLabel", markdown_label_h)
hi("markdownHeadingDelimiter", markdown_delimiter_h)
hi("markdownItalicDelimiter", markdown_delimiter_h)
hi("markdownBoldDelimiter", markdown_delimiter_h)
hi("markdownBoldItalicDelimiter", markdown_delimiter_h)
hi("markdownStrikeDelimiter", markdown_delimiter_h)
hi("markdownCodeDelimiter", markdown_delimiter_h)
hi("markdownLinkTextDelimiter", markdown_delimiter_h)
hi("markdownLinkDelimiter", markdown_delimiter_h)
hi("markdownUrl", markdown_delimiter_h)
2024-04-11 19:15:09 +02:00
2024-06-12 00:48:33 +02:00
-- yaml ------------------------------------------------------------------------
2024-07-05 17:00:27 +02:00
hi("yamlBlockMappingKey", syntax_comment_h)
hi("yamlPlainScalar", syntax_constant_h)