local M = {} M.highlights_base = function(colors, base) local colorscheme = { green = { main = colors.green, high = colors.orange_light, main_dark = colors.green_dark, extra = colors.green_dark, }, orange = { main = colors.orange_light, high = colors.green, main_dark = colors.orange, extra = colors.orange, }, } local selected = base or "green" local main = colorscheme[selected].main local high = colorscheme[selected].high local main_dark = colorscheme[selected].main_dark local extra = colorscheme[selected].extra return { Boolean = { fg = main }, Character = { fg = high }, ColorColumn = { bg = colors.background }, Comment = { fg = colors.light_gray }, Conditional = { fg = main_dark }, Constant = { fg = high }, Cursor = { fg = colors.white, bg = main }, CursorColumn = { bg = colors.gray }, CursorIM = { fg = colors.foreground, bg = colors.cursor }, CursorLine = { bg = colors.gray }, CursorLineNr = { fg = main }, Debug = { fg = colors.blue }, Define = { fg = extra }, Delimiter = { fg = colors.white }, DiffAdd = { fg = colors.white, bg = main }, DiffChange = { fg = colors.white, bg = main }, DiffDelete = { fg = colors.white, bg = colors.red }, DiffText = { fg = colors.foreground, bg = main }, Directory = { fg = high }, EndOfBuffer = { fg = colors.gray, bg = colors.transparent }, -- for some reason every single squirly bracket in c appears red if i leave this red???? Error = { fg = main, bg = colors.transparent }, ErrorMsg = { fg = colors.red, bg = colors.transparent }, Exception = { fg = colors.red }, Float = { fg = main }, FloatBorder = { fg = main, bg = colors.transparent }, FoldColumn = { fg = main, bg = colors.transparent }, Folded = { fg = main, bg = colors.transparent }, Function = { fg = main_dark }, Identifier = { fg = main }, Ignore = { fg = colors.light_gray, bg = colors.transparent }, IncSearch = { fg = colors.white, bg = high }, Include = { fg = main }, Keyword = { fg = high }, Label = { fg = extra }, LineNr = { fg = colors.light_gray, bg = colors.transparent }, LineNrAbove = { fg = colors.light_gray, bg = colors.transparent }, LineNrBelow = { fg = colors.light_gray, bg = colors.transparent }, Macro = { fg = extra }, MatchParen = { fg = colors.white, bg = main }, ModeMsg = { fg = main, bg = colors.transparent }, MoreMsg = { fg = main }, MsgArea = { fg = main, bg = colors.transparent }, MsgSeparator = { fg = colors.gray, bg = colors.transparent }, NonText = { fg = colors.gray }, Normal = { fg = main, bg = colors.transparent }, NormalFloat = { fg = main, bg = colors.background }, NormalNC = { fg = main, bg = colors.transparent }, Number = { fg = high }, Operator = { fg = main }, Pmenu = { fg = colors.white, bg = colors.black }, PmenuSbar = { fg = colors.white, bg = main }, PmenuSel = { fg = colors.white, bg = main }, PmenuThumb = { bg = main }, PreCondit = { fg = main_dark }, PreProc = { fg = main_dark }, Question = { fg = main }, QuickFixLine = { bg = main, fg = colors.white }, Repeat = { fg = main }, Search = { fg = colors.white, bg = main }, SignColumn = { fg = colors.transparent, bg = colors.transparent }, Special = { fg = colors.yellow }, SpecialChar = { fg = main }, SpecialComment = { fg = colors.white }, SpecialKey = { fg = colors.white, bg = colors.red }, SpellBad = { fg = colors.red }, SpellCap = { fg = main }, SpellLocal = { fg = colors.yellow }, SpellRare = { fg = colors.blue }, Statement = { fg = main }, StatusLine = { fg = colors.transparent, bg = colors.transparent }, StatusLineNC = { fg = colors.transparent, bg = colors.transparent }, StorageClass = { fg = main }, String = { fg = high }, Structure = { fg = high }, Substitute = { fg = colors.white, bg = main }, Tag = { fg = high }, TermCursor = { fg = colors.foreground, bg = colors.cursor }, TermCursorNC = { fg = colors.foreground, bg = colors.cursor }, Title = { fg = main }, Todo = { fg = colors.white, bg = colors.transparent }, Type = { fg = main_dark }, Typedef = { fg = main_dark }, Variable = { fg = main }, VertSplit = { fg = colors.blue, bg = colors.transparent }, Visual = { fg = colors.white, bg = main }, VisualNOS = { bg = colors.transparent }, WarningMsg = { fg = colors.yellow, bg = colors.transparent }, Whitespace = { fg = colors.gray, bg = colors.background }, WildMenu = { fg = colors.white, bg = colors.white }, WinBar = { bg = colors.transparent }, WinBarNC = { bg = colors.transparent }, WinSeparator = { fg = colors.gray, bg = colors.transparent }, healthError = { fg = colors.red }, healthSuccess = { fg = colors.green }, healthWarning = { fg = colors.yellow }, lCursor = { fg = colors.foreground, bg = colors.cursor }, -- diagnostics DiagnosticError = { fg = colors.red }, DiagnosticHint = { fg = colors.orange }, DiagnosticInfo = { fg = colors.white }, DiagnosticWarn = { fg = colors.yellow }, DiagnosticUnderlineError = { undercurl = true, fg = colors.red }, DiagnosticUnderlineHint = { undercurl = true, fg = colors.orange }, DiagnosticUnderlineInfo = { undercurl = true, fg = colors.white }, DiagnosticUnderlineWarn = { undercurl = true, fg = colors.yellow }, -- Telescope TelescopeBorder = { fg = main, bg = colors.transparent }, TelescopeNormal = { fg = colors.white, bg = colors.transparent }, TelescopeSelection = { fg = colors.transparent, bg = main }, -- treesitter -- These groups are for the neovim tree-sitter highlights. -- As of writing, tree-sitter support is a WIP, group names may color5. -- By default, most of these groups link to an appropriate Vim group, -- TSError -> Error for example, so you do not have to define these unless -- you explicitly want to support Treesitter's improved syntax awareness. -- TSAnnotation = { }; -- For C++/Dart attributes, annotations that can be attached to the code to denote some kind of meta information. -- TSBoolean = { }; -- For booleans. -- TSCharacter = { }; -- For characters. -- TSComment = { }; -- For blueblocks. TSComment = { fg = colors.blue}, TSConstructor = { fg = colors.blue}, -- For constructor calls and definitions: `= { }` in Lua, and Java constructors. TSDanger = { fg = colors.transparent, bg = colors.blue}, TSNote = { fg = colors.transparent, bg = colors.blue}, TSWarning = { fg = colors.transparent, bg = colors.blue}, -- TSConditional = { }; -- For keywords related to conditionnals. -- 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. -- TSError = { }; -- For syntax/parser errors. -- TSException = { }; -- For exception related keywords. TSField = { fg = colors.blue }, -- For fields. -- TSFloat = { }; -- For floats. -- TSFunction = { }; -- For function (calls and definitions). -- TSFuncBuiltin = { }; -- For builtin functions: `table.insert` in Lua. -- TSFuncMacro = { }; -- For macro defined fuctions (calls and definitions): each `macro_rules` in Rust. -- TSInclude = { }; -- For includes: `#include` in C, `use` or `extern crate` in Rust, or `require` in Lua. TSKeyword = { fg = colors.blue}, -- For keywords that don't fall in previous categories. TSKeywordFunction = { fg = colors.blue}, -- For keywords used to define a fuction. TSLabel = { fg = colors.blue}, -- For labels: `label:` in C and `:label:` in Lua. -- TSMethod = { }; -- For method calls and definitions. -- TSNamespace = { }; -- For identifiers referring to modules and namespaces. -- TSNone = { }; -- TODO: docs -- TSNumber = { }; -- For all numbers TSOperator = { fg = colors.blue}, -- For any operator: `+`, but also `->` and `*` in C. TSParameter = { fg = colors.blue}, -- For parameters of a function. -- TSParameterReference= { }; -- For references to parameters of a function. TSProperty = { fg = colors.blue}, -- Same as `TSField`. TSPunctDelimiter = { fg = colors.blue}, -- For delimiters ie: `.` TSPunctBracket = { fg = colors.foreground }, -- For brackets and parens. TSPunctSpecial = { fg = colors.blue}, -- For special punctutation that does not fall in the catagories before. -- TSRepeat = { }; -- For keywords related to loops. -- TSString = { }; -- For strings. TSStringRegex = { fg = colors.blue}, -- For regexes. TSStringEscape = { fg = colors.blue}, -- For escape characters within a string. -- TSSymbol = { }; -- For identifiers referring to symbols or atoms. -- TSType = { }; -- For types. -- TSTypeBuiltin = { }; -- For builtin types. TSVariableBuiltin = { fg = colors.blue }, -- Variable names that are defined by the languages, like `this` or `self`. -- TSTag = { }; -- Tags like html tag names. -- TSTagDelimiter = { }; -- Tag delimiter like `<` `>` `/` -- TSText = { }; -- For strings considered text in a markup language. TSTextReference = { fg = colors.blue}, -- TSEmphasis = { }; -- For text to be represented with emphasis. -- TSUnderline = { }; -- For text to be represented with an underline. -- TSStrike = { }; -- For strikethrough text. -- TSTitle = { }; -- Text that is part of a title. -- TSLiteral = { }; -- Literal text. -- TSURI = { }; -- Any URI like a link or email. } end return M