---@diagnostic disable: undefined-global --- vim: fdm=marker local lush = require('lush') local hsl = lush.hsl local p = require('color_palette') return lush(function() return { -- Meta {{{ deEmph { fg = hsl(p.normal.white).darken(40) }, -- }}} -- Base highlights {{{ Bold { gui = 'bold' }, Italic { gui = 'italic' }, None { fg = 'none', bg = 'none', gui = 'none' }, Reverse { gui = 'reverse' }, Underlined { gui = 'underline' }, -- (preferred) text that stands out, HTML links ColorColumn { bg = hsl(p.dim.white).darken(40) }, -- used for the columns set with 'colorcolumn' Conceal { gui = 'none' }, -- placeholder characters substituted for concealed text (see 'conceallevel') Cursor { Reverse }, -- character under the cursor CursorIM { Cursor }, -- like Cursor, but used when in IME mode |CursorIM| TermCursor { Cursor }, -- cursor in a focused terminal TermCursorNC { Cursor }, -- cursor in an unfocused terminal lCursor { Cursor }, -- the character under the cursor when |language-mapping| is used (see 'guicursor') CursorColumn { ColorColumn }, -- Screen-column at the cursor, when 'cursorcolumn' is set. CursorLine { ColorColumn }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set. CursorLineNr { Cursor }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. DiffAdd { fg = hsl(p.bright.black), bg = hsl(p.bright.green) }, -- diff mode: Added line |diff.txt| DiffChange { fg = hsl(p.bright.black), bg = hsl(p.bright.cyan).darken(20) }, -- diff mode: Changed line |diff.txt| DiffDelete { fg = hsl(p.bright.black), bg = hsl(p.bright.red) }, -- diff mode: Deleted line |diff.txt| DiffText { DiffChange }, -- diff mode: Changed text within a changed line |diff.txt| -- Directory { }, -- directory names (and other special names in listings) EndOfBuffer { fg = hsl(p.bright.blue) }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. ErrorMsg { Bold, fg = hsl(p.bright.white), bg = hsl(p.dim.red) }, -- error messages on the command line Folded { fg = hsl(p.bright.magenta), bg = 'none' }, -- line used for closed folds FoldColumn { Folded }, -- 'foldcolumn' Search { Bold, fg = hsl(p.normal.black), bg = hsl(p.bright.white) }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. IncSearch { Search }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" LineNr { fg = hsl(p.dim.white) }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set. MatchParen { fg = hsl(p.dim.black), bg = hsl(p.bright.magenta) }, -- The character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt| ModeMsg { fg = hsl(p.normal.yellow) }, -- 'showmode' message (e.g., "-- INSERT -- ") MoreMsg { fg = hsl(p.normal.cyan) }, -- |more-prompt| -- MsgArea { }, -- Area for messages and cmdline -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display' NonText { EndOfBuffer }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|. Normal { fg = hsl(p.bright.white) }, -- normal text NormalFloat { Normal, bg = hsl(p.dim.white) }, -- Normal text in floating windows. NormalNC { Normal }, -- normal text in non-current windows Question { fg = hsl(p.normal.green) }, -- |hit-enter| prompt and yes/no questions -- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there. SignColumn { gui = 'none' }, -- column where |signs| are displayed SpecialKey { fg = hsl(p.dim.white) }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace| SpellBad { fg = hsl(p.bright.red), gui = 'underline' }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise. -- SpellCap { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise. -- SpellLocal { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise. -- SpellRare { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise. StatusLine { fg = hsl(p.bright.white), bg = 'none', gui = 'bold' }, -- status line of current window StatusLineNC { fg = hsl(p.bright.white), bg = hsl(p.dim.white), gui = 'none' }, -- status lines of not-current windows Note: if this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window. Substitute { fg = hsl(p.normal.blue) }, -- |:substitute| replacement text highlighting TabLine { fg = hsl(p.dim.white) }, -- tab pages line, not active tab page label TabLineFill { StatusLineNC }, -- tab pages line, where there are no labels TabLineSel { fg = hsl(p.bright.white), gui = 'bold' }, -- tab pages line, active tab page label Title { fg = hsl(p.bright.blue), gui = 'bold' }, -- titles for output from ":set all", ":autocmd" etc. VertSplit { fg = hsl(p.dim.white), bg = 'none' }, -- the column separating vertically split windows Visual { fg = hsl(p.bright.white), bg = hsl(p.normal.magenta) }, -- Visual mode selection VisualNOS { Visual }, -- Visual mode selection when vim is "Not Owning the Selection". WarningMsg { fg = hsl(p.normal.yellow) }, -- warning messages Whitespace { fg = hsl(p.dim.white) }, -- "nbsp", "space", "tab" and "trail" in 'listchars' WildMenu { bg = hsl(p.bright.black) }, -- current match in 'wildmenu' completion Pmenu { NormalFloat }, -- Popup menu: normal item. PmenuSel { Visual }, -- Popup menu: selected item. PmenuSbar { bg = 'none' }, -- Popup menu: scrollbar. PmenuThumb { bg = hsl(p.bright.white) }, -- Popup menu: Thumb of the scrollbar. Boolean { fg = hsl(p.bright.red).lighten(20) }, -- a boolean constant: TRUE, false String { fg = hsl(p.normal.yellow) }, -- a string constant: "this is a string" Character { String }, -- a character constant: 'c', '\n' Number { Boolean }, -- a number constant: 234, 0xff Float { Number }, -- a floating point constant: 2.3e10 Comment { Italic, fg = hsl(p.dim.white).lighten(30) }, Macro { fg = hsl(p.normal.cyan) }, -- same as Define Constant { gui = 'bold' }, -- (preferred) any constant Special { fg = hsl(p.normal.yellow) }, -- (preferred) any special symbol SpecialComment { fg = hsl(p.bright.cyan), gui = 'italic' }, -- special things inside a comment Statement { fg = hsl(p.bright.blue) }, -- (preferred) any statement Keyword { fg = hsl(p.normal.green) }, -- any other keyword Tag { Special, gui = 'underline' }, -- you can use CTRL-] on this Type { fg = hsl(p.bright.green) }, -- (preferred) int, long, char, etc. Conditional { Keyword }, -- if, then, else, endif, switch, etc. Define { Macro }, -- preprocessor #define Delimiter { Special }, -- character that needs attention Exception { Keyword }, -- try, catch, throw Function { Normal }, -- function name (also: methods for classes) Identifier { Normal }, -- (preferred) any variable name Include { Macro }, -- preprocessor #include Label { Keyword }, -- case, default, etc. Operator { Keyword }, -- "sizeof", "+", "*", etc. PreCondit { Macro }, -- preprocessor #if, #else, #endif, etc. PreProc { Macro }, -- (preferred) generic Preprocessor Repeat { Keyword }, -- for, do, while, etc. SpecialChar { Special }, -- special character in a constant Typedef { Type }, -- A typedef StorageClass { Type }, -- static, register, volatile, etc. Structure { Type }, -- struct, union, enum, etc. Debug { Special }, -- debugging statements Error { Bold, fg = hsl(p.normal.red) }, -- (preferred) any erroneous construct Ignore { None }, -- (preferred) left blank, hidden |hl-Ignore| Todo { Bold, fg = hsl(p.bright.yellow) }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX --- }}} -- Lang specific {{{ -- C {{{ -- cAnsiFunction { Bold }, -- cAnsiName {}, -- cBraces {}, -- cCharacter {}, -- cConditional { Bold }, -- cCustomFunc {}, -- cCustomParen {}, -- cDefine {}, -- cDelimiter {}, -- cFormat {}, -- cFunction {}, -- cIdentifier {}, -- cLabel { fg = hsl(p.dim.black), bg = hsl(p.dim.red) }, -- cNumber {}, -- cOctalZero { Bold }, -- cOperator {}, -- cPreCondit {}, -- cRepeat {}, -- cSemiColon {}, -- cStatement {}, -- cStorageClass { Bold }, -- cTodo { Bold }, -- cUserFunction { Function, gui = 'bold' }, cBoolean { Boolean, gui = 'bold' }, cConstant { Constant, gui = 'bold' }, cSpecial { Bold }, cStructure { Bold }, cType { Type, gui = 'bold' }, -- }}} -- Markdown {{{ -- mkdCode { markdownCode }, mkdBlockQuote { Comment }, mkdDelimiter { Delimiter }, mkdHeading { Title }, -- mkdID { Constant }, -- mkdLink { Tag }, -- mkdLinkTitle { bg = hsl('#ff0000') }, -- mkdListItem { Number }, -- mkdURL { Tag }, mkdBold { Bold }, mkdItalic { Italic }, mkdBoldItalic { gui = "bold,italic" }, -- }}} -- Go {{{ -- goType { Type }, -- goTSType { Type }, -- }}} -- }}} -- LSP {{{ DiagnosticError { Error }, LspDiagnosticsError { DiagnosticError }, LspDiagnosticsFloatingError { DiagnosticError }, LspDiagnosticsVirtualTextError { fg = DiagnosticError.fg.darken(40) }, LspDiagnosticsSignError { DiagnosticError }, DiagnosticWarn { WarningMsg }, LspDiagnosticsWarning { DiagnosticWarn }, LspDiagnosticsFloatingWarning { DiagnosticWarn }, LspDiagnosticsVirtualTextWarning { fg = DiagnosticWarn.fg.darken(60) }, LspDiagnosticsSignWarning { DiagnosticWarn }, DiagnosticInfo { MoreMsg }, LspDiagnosticsInformation { DiagnosticInfo }, LspDiagnosticsFloatingInformation { DiagnosticInfo }, LspDiagnosticsVirtualTextInformation { fg = DiagnosticInfo.fg.darken(20) }, LspDiagnosticsSignInformation { DiagnosticInfo }, DiagnosticHint { Normal }, LspDiagnosticsHint { DiagnosticHint }, LspDiagnosticsFloatingHint { DiagnosticHint }, LspDiagnosticsVirtualTextHint { fg = DiagnosticHint.fg.darken(40) }, LspDiagnosticsSignHint { DiagnosticHint }, -- LspDiagnosticsUnderlineError {}, -- LspDiagnosticsUnderlineWarning {}, -- LspDiagnosticsUnderlineInformation {}, -- LspDiagnosticsUnderlineHint {}, -- LspReferenceText { }, -- used for highlighting "text" references -- LspReferenceRead { }, -- used for highlighting "read" references -- LspReferenceWrite { }, -- used for highlighting "write" references -- }}} -- TreeSitter {{{ TSError { Error }, -- For syntax/parser errors. -- TSPunctDelimiter { }, -- For delimiters ie: `.` TSPunctBracket { Normal }, -- For brackets and parens. -- TSPunctSpecial { }, -- For special punctutation that does not fall in the catagories before. -- TSConstant { }, -- For constants -- TSConstBuiltin { }, -- For constant that are built in the language: `nil` in Lua. -- TSConstMacro { }, -- For constants that are defined by macros: `NULL` in C. -- TSString { }, -- For strings. -- TSStringRegex { }, -- For regexes. -- TSStringEscape { }, -- For escape characters within a string. -- TSCharacter { }, -- For characters. -- TSNumber { }, -- For integers. -- TSBoolean { }, -- For booleans. -- TSFloat { }, -- For floats. -- TSFunction { }, -- For function (calls and definitions). TSFuncBuiltin { fg = hsl(p.normal.magenta) }, -- For builtin functions: `table.insert` in Lua. -- TSFuncMacro { }, -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust. -- TSParameter { }, -- For parameters of a function. -- TSParameterReference { }, -- For references to parameters of a function. -- TSMethod { }, -- For method calls and definitions. -- TSField { }, -- For fields. -- TSProperty { }, -- Same as `TSField`. -- TSConstructor { }, -- For constructor calls and definitions: `{ }` in Lua, and Java constructors. -- TSConditional { }, -- For keywords related to conditionnals. -- TSRepeat { }, -- For keywords related to loops. -- TSLabel { }, -- For labels: `label:` in C and `:label:` in Lua. -- TSOperator { }, -- For any operator: `+`, but also `->` and `*` in C. -- TSKeyword { }, -- For keywords that don't fall in previous categories. -- TSKeywordFunction { }, -- For keywords used to define a fuction. -- TSException { }, -- For exception related keywords. TSType { Type }, -- For types. TSTypeBuiltin { Type }, -- For builtin types (you guessed it, right ?). -- TSNamespace { }, -- For identifiers referring to modules and namespaces. -- TSInclude { }, -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. -- TSAnnotation { }, -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSText { }, -- For strings considered text in a markup language. -- TSStrong { }, -- For text to be represented with strong. -- TSEmphasis { }, -- For text to be represented with emphasis. TSUnderline { Underlined }, -- For text to be represented with an underline. -- TSTitle { }, -- Text that is part of a title. -- TSLiteral { }, -- Literal text. -- TSURI { }, -- Any URI like a link or email. -- TSVariable { }, -- Any variable name that does not have another highlight. -- TSVariableBuiltin { }, -- Variable names that are defined by the languages, like `this` or `self`. -- }}} -- Plugin configs {{{ IndentGuidesOdd { bg = hsl(p.bright.black) }, IndentGuidesEven { bg = hsl(p.dim.white).darken(40) }, IndentBlanklineChar { fg = hsl(p.dim.white), gui = 'nocombine'}, -- gitsigns {{{ GitSignsChangeLn { DiffChange }, GitSignsAddLn { DiffAdd }, GitSignsDeleteLn { DiffDelete }, GitSignsChange { fg = GitSignsChangeLn.bg }, GitSignsAdd { fg = GitSignsAddLn.bg }, GitSignsDelete { fg = GitSignsDeleteLn.bg }, -- }}} -- git {{{ gitcommitSummary { Bold }, -- gitcommitHeader { Bold }, -- gitcommitSelectedType {}, -- gitcommitSelectedFile {}, -- gitcommitUntrackedFile {}, -- gitcommitBranch {}, -- gitcommitDiscardedType {}, gitcommitDiff { Comment }, diffFile { fg = hsl(p.bright.yellow) }, diffSubname { diffFile }, diffIndexLine { diffFile }, diffAdded { DiffAdd }, diffRemoved { DiffDelete }, -- diffLine {}, -- diffBDiffer {}, -- diffNewFile {}, -- }}} -- git-messenger {{{ gitmessengerPopupNormal { CursorLine }, gitmessengerHeader { Statement }, gitmessengerHash { Special }, gitmessengerHistory { Title }, gitmessengerEmail { Comment }, -- }}} -- nvim-lightbulb {{{ LightBulbFloatWin { LspDiagnosticsFloatingHint }, LightBulbVirtualText { LspDiagnosticsVirtualTextHint }, -- }}} CompeDocumentation { NormalFloat }, -- startify {{{ StartifyBracket { fg = hsl(p.bright.blue) }, StartifyFile { fg = hsl(p.normal.red), gui = 'bold' }, StartifyNumber { fg = hsl(p.bright.blue).darken(20) }, StartifyPath { fg = hsl(p.normal.green).lighten(10) }, StartifySlash { fg = hsl(p.normal.white) }, StartifySection { fg = hsl(p.bright.yellow) }, StartifySpecial { fg = hsl(p.normal.red) }, StartifyHeader { fg = hsl(p.dim.white) }, StartifyFooter { fg = hsl(p.dim.white) }, -- }}} AlphaFortune { Comment }, -- Plugin configs END }}} -- Config specific StatusLineIcon { fg = hsl(p.bright.magenta) }, StatusLineInsert { StatusLine }, StatusLineCommand { StatusLine }, StatusLineVisual { Visual }, StatusLineReplace { fg = hsl(p.bright.white), bg = hsl(p.bright.red) }, StatusLineJobs { DiagnosticHint }, StatusLineDiagnostics { StatusLine }, StatusLineLightbulb { fg = hsl(p.bright.yellow) }, } end)