this repo has no description
at 5e00194f258e7030dc93dc194e022f9dd0726d69 360 lines 15 kB view raw
1-- vim: set fdm=marker: 2-- TODO port work config changes? 3 4local Color, colors, Group, groups, styles = require("colorbuddy").setup() 5local c = colors 6local g = groups 7local s = styles 8 9local my_colors = { 10 -- Syntax elements 11 constant = '#E5786D', 12 namespace = '#E5786D', 13 statement = '#88B8F6', 14 operator = '#88B8F6', 15 identifier = '#E3E0D7', 16 func = '#CAE682', 17 type = '#D4D987', 18 special = '#EADEAD', 19 string = '#95E454', 20 escape = '#D787FF', 21 character = '#E5786D', 22 23 -- Diffing 24 diff_add = '#006600', 25 diff_delete = '#880000', 26 diff_change = '#444400', 27 sign_add = '#33cc33', 28 sign_change = '#cccc33', 29 sign_change_delete = '#ee9933', 30 sign_delete = '#cc3333', 31 sign_delete_first_line = '#cc3333', 32 33 -- Misc highlight 34 comment = '#9C998E', 35 non_text = '#6e696c', 36 bright_text = '#ffffd7', 37 38 -- UI 39 search = '#D787FF', 40 search_bg = '#636066', 41 fold = '#E3E0D7', -- norm, for now 42 fold_bg = '#3A4046', 43 match_paren = '#EAE788', 44 match_paren_bg = '#857B6F', 45 visual_bg = '#554D4B', 46 47 bg_accent = '#1C1C1C', 48 norm_accent = '#9C998E', 49 main_bg = '#242424', 50 norm = '#E3E0D7', 51 bg_very_subtle = '#303030', 52 bg_subtle = '#444444', 53 54 mid_gray = '#838086', 55 56 -- LSP and diagnostics 57 annotation = '#00bbbb', 58 warning = '#E7ED30', 59 error = '#FF444A', 60 todo = '#D4D987', 61 62 -- TODO 63 note = '#00FF00', 64 note_bg = '#0000FF', 65 66 unknown = '#FF2026', 67} 68 69for key, value in pairs(my_colors) do 70 Color.new(key, value) 71end 72 73-- General {{{1 74Group.new("Normal", c.norm, c.main_bg) 75Group.new("Cursor", c.main_bg, c.norm) 76Group.new("Visual", c.none, c.visual_bg) 77Group.new("VisualNOS", c.none, c.bg_very_subtle) 78Group.new("Search", c.search, c.search_bg) 79Group.new("Folded", c.fold, c.fold_bg) 80Group.new('VertSplit', c.norm_accent, c.bg_accent) 81Group.new("LineNr", c.norm_accent, c.bg_accent, s.none) 82Group.new("CursorLine", c.none, c.bg_very_subtle, s.none) 83Group.new("CursorColumn", c.none, c.bg_very_subtle, s.none) 84Group.new("ColorColumn", c.none, c.error, s.none) 85Group.new("MatchParen", c.match_paren, c.match_paren_bg, s.bold) 86Group.new("Title", c.bright_text, c.none, styles.bold) 87 88-- Pmenu (and pmenu scrollbar) {{{1 89Group.new("Pmenu", c.norm, c.bg_accent, s.none) 90Group.new("PmenuSel", c.norm, c.bg_very_subtle, s.bold) 91--Group.new("PmenuSbar", c.norm, c.bg_subtle, s.none) 92--Group.new("PmenuThumb", c.norm, c.bg_subtle, s.none) 93 94-- Diff {{{1 95Group.new("DiffAdd", c.none, c.diff_add) 96Group.new("DiffDelete", c.none, c.diff_delete) 97Group.new("DiffChange", c.none, c.diff_change) 98Group.new("DiffText", c.none, c.diff_change, s.underline+s.bold) 99 100-- Unsure why I have to specify the bg here, 101-- seems the default uses the diff line color? 102Group.new("SignAdd", c.sign_add, c.bg_accent, s.none) 103Group.new("SignChange", c.sign_change, c.bg_accent, s.none) 104Group.new("SignChangeDelete", c.sign_change_delete, c.bg_accent, s.none) 105Group.new("SignDelete", c.sign_delete, c.bg_accent, s.none) 106Group.new("SignDeleteFirstLine", c.sign_delete_first_line, c.bg_accent, s.none) 107 108Group.link("SignifySignAdd", g.SignAdd) 109Group.link("SignifySignChange", g.SignChange) 110Group.link("SignifySignChangeDelete", g.SignChangeDelete) 111Group.link("SignifySignDelete", g.SignDelete) 112Group.link("SignifySignDeleteFirstLine", g.SignDeleteFirstLine) 113 114Group.link("GitGutterAdd", g.SignAdd) 115Group.link("GitGutterDelete", g.SignDelete) 116Group.link("GitGutterChange", g.SignChange) 117Group.link("GitGutterChangeDelete", g.SignChangeDelete) 118 119-- Misc {{{1 120Group.new("SpecialKey", c.mid_gray, c.none, s.none) 121Group.new("Underlined", c.none, c.none, s.underline) 122Group.new("Ignore", c.main_bg, c.none, s.none) 123 124Group.new("Error", c.error, c.none, s.none) 125Group.new("Warning", c.warning, c.none, s.none) 126Group.new("Hint", c.annotation, c.none, s.none) 127Group.new("Info", c.annotation, c.none, s.none) 128 129-- Messages, setting ErrorMsg to bold will make errors rather visible, 130-- setting ErrorMsg to have a bg color even more so. :) 131-- Sadly this is also noisy af, not recommended for day to day usage. 132-- Should probably be a config option, like a debug mode. 133Group.new("ErrorMsg", c.error, c.none, s.none) 134Group.new("WarningMsg", c.warning, c.none, s.none) 135Group.new("MoreMsg", c.mid_gray, c.none, s.none) 136Group.link("ModeMsg", g.MoreMsg) 137 138Group.new("NonText", c.non_text, c.none, s.none) 139Group.new("Note", c.none, c.none, s.bold) -- e.g. TODO and FIXME 140 141-- ? {{{1 142--Group.new("Directory", c.dark_blue, c.none, s.none) 143--Group.new("IncSearch", c.light_black, c.yellow, s.none) 144--Group.new("CursorLineNr", c.purple, c.bg_very_subtle, s.none) 145--Group.new("Question", c.unknown, c.none, s.none) 146--Group.new("WildMenu", c.main_bg, c.norm, s.none) 147--Group.new("Folded", c.medium_gray, c.none, s.none) 148 149Group.new("SignColumn", c.none, c.bg_accent, s.none) 150Group.new("FoldColumn", c.mid_gray, c.bg_accent, s.none) 151 152--Group.new("TabLine", c.norm, c.bg_very_subtle, s.none) 153--Group.new("TabLineSel", c.purple, c.bg_subtle, s.bold) 154--Group.new("TabLineFill", c.norm, c.bg_very_subtle, s.none) 155 156--Group.new("MatchParen", c.norm, c.bg_subtle, s.none) 157--Group.new("qfLineNr", c.medium_gray, c.none, s.none) 158--Group.new("htmlH1", c.norm, c.bg, s.none) 159--Group.new("htmlH2", c.norm, c.bg, s.none) 160--Group.new("htmlH3", c.norm, c.bg, s.none) 161--Group.new("htmlH4", c.norm, c.bg, s.none) 162--Group.new("htmlH5", c.norm, c.bg, s.none) 163--Group.new("htmlH6", c.norm, c.bg, s.none) 164 165-- Syntax - Main groups {{{1 166Group.new("Statement", c.statement, c.none, s.none) 167Group.link("Keyword", g.Statement) 168Group.link("Conditional", g.Statement) 169Group.link("Repeat", g.Statement) 170Group.link("Label", g.Statement) 171Group.link("Keyword", g.Statement) 172Group.link("Exception", g.Statement) 173 174Group.new("Constant", c.constant, c.none, s.none) 175Group.link("Number", g.Constant) 176Group.link("Boolean", g.Constant) 177Group.link("Float", g.Constant) 178 179Group.link("PreProc", g.Constant) 180Group.link("Include", g.PreProc) 181Group.link("Define", g.PreProc) 182Group.link("Macro", g.PreProc) 183Group.link("PreCondit", g.PreProc) 184 185Group.new("Identifier", c.identifier, c.none, s.none) 186Group.new("Function", c.func, c.none, s.none) 187 188Group.new("Type", c.type, c.none, s.none) 189Group.link("StorageClass", g.Type) 190Group.link("Structure", g.Type) 191Group.link("Typedef", g.Type) 192 193Group.new("Special", c.special, c.none, s.none) 194Group.link("SpecialChar", g.Special) 195Group.link("Tag", g.Special) 196Group.link("Delimiter", g.Special) 197Group.link("SpecialComment", g.Special) 198Group.link("Debug", g.Special) 199 200Group.new("String", c.string, c.none) 201Group.new("Character", c.character, c.none) 202Group.new("StringEscape", c.escape, c.none) 203--Group.link("Character", g.String) 204 205Group.new("Comment", c.comment, c.none) 206Group.new("Operator", c.operator, c.none) 207Group.new("Todo", c.main_bg, c.todo) 208 209Group.new("Noop", c.norm_accent, c.none, s.none) 210Group.link("CocFadeOut", g.Noop) 211 212Group.new("Annotation", c.annotation, c.none) 213Group.link("LspInlayHint", g.NonText) 214Group.link("CocInlayHint", g.NonText) 215Group.link("DiagnosticHint", g.NonText) 216 217Group.link("DiagnosticSignHint", g.Hint) 218Group.link("DiagnosticSignInfo", g.Info) 219Group.link("DiagnosticSignWarn", g.Warning) 220Group.link("DiagnosticSignError", g.Error) 221Group.link("DiagnosticHint", g.Hint) 222Group.link("DiagnosticInfo", g.Info) 223Group.link("DiagnosticWarn", g.Warning) 224Group.link("DiagnosticError", g.Error) 225 226-- Syntax - Treesitter {{{1 227Group.new("UnknownThing", c.norm, c.unknown) 228 229-- Structured following: 230-- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights 231 232-- Misc {{{2 233Group.link("@comment", g.Comment) -- line and block comments 234Group.link("@error", g.ErrorMsg) -- syntax/parser errors 235--Group.link("@none", g.UnknownThing) -- completely disable the highlight 236--Group.link("@preproc", g.UnknownThing) -- various preprocessor directives & shebangs 237--Group.link("@define", g.UnknownThing) -- preprocessor definition directives 238Group.link("@operator", g.Operator) -- symbolic operators (e.g. `+` / `*`) 239 240-- Punctuation {{{2 241Group.link("@punctuation.delimiter", g.Special) -- delimiters (e.g. `;` / `.` / `,`) 242Group.link("@punctuation.bracket", g.Special) -- brackets (e.g. `()` / `{}` / `[]`) 243Group.link("@punctuation.special", g.Special) -- special symbols (e.g. `{}` in string interpolation) 244 245-- Literals {{{2 246Group.link("@string", g.String) -- string literals 247Group.link("@string.regex", g.String) -- regular expressions 248Group.link("@string.escape", g.StringEscape) -- escape sequences 249Group.link("@string.special", g.String) -- other special strings (e.g. dates) 250 251Group.link("@character", g.Character) -- character literals 252Group.link("@character.special", g.Character) -- special characters (e.g. wildcards) 253 254Group.link("@boolean", g.Boolean) -- boolean literals 255Group.link("@number", g.Number) -- numeric literals 256Group.link("@float", g.Float) -- floating-point number literals 257 258-- Functions {{{2 259Group.link("@function", g.Function) -- function definitions 260Group.link("@function.builtin", g.Function) -- built-in functions 261--Group.link("@function.call", g.UnknownThing) -- function calls 262Group.link("@function.macro", g.Function) -- preprocessor macros 263 264Group.link("@method", g.Function) -- method definitions 265-- Group.link("@method.call", g.UnknownThing) -- method calls 266 267Group.link("@constructor", g.Function) -- constructor calls and definitions 268Group.link("@parameter", g.Normal) -- parameters of a function 269 270-- Keywords {{{2 271Group.link("@keyword", g.Keyword) -- various keywords 272Group.link("@keyword.function", g.Keyword) -- keywords that define a function (e.g. `func` in Go, `def` in Python) 273Group.link("@keyword.operator", g.Keyword) -- operators that are English words (e.g. `and` / `or`) 274Group.link("@keyword.return", g.Keyword) -- keywords like `return` and `yield` 275 276Group.link("@conditional", g.Conditional) -- keywords related to conditionals (e.g. `if` / `else`) 277Group.link("@repeat", g.Repeat) -- keywords related to loops (e.g. `for` / `while`) 278--Group.link("@debug", g.UnknownThing) -- keywords related to debugging 279Group.link("@label", g.Label) -- GOTO and other labels (e.g. `label:` in C) 280Group.link("@include", g.Include) -- keywords for including modules (e.g. `import` / `from` in Python) 281Group.link("@exception", g.Exception) -- keywords related to exceptions (e.g. `throw` / `catch`) 282 283-- Types {{{2 284Group.link("@type", g.Type) -- type or class definitions and annotations 285Group.link("@type.builtin", g.Type) -- built-in types 286--Group.link("@type.definition", g.UnknownThing) -- type definitions (e.g. `typedef` in C) 287--Group.link("@type.qualifier", g.UnknownThing) -- type qualifiers (e.g. `const`) 288 289--Group.link("@storageclass", g.UnknownThing) -- visibility/life-time modifiers 290--Group.link("@storageclass.lifetime", g.UnknownThing) -- life-time modifiers (e.g. `static`) 291--Group.link("@attribute", g.UnknownThing) -- attribute annotations (e.g. Python decorators) 292--Group.link("@field", g.UnknownThing) -- object and struct fields 293Group.link("@property", g.Identifier) -- similar to `@field` 294 295-- Identifiers {{{2 296Group.link("@variable", g.Identifier) -- various variable names 297--Group.link("@variable.builtin", g.UnknownThing) -- built-in variable names (e.g. `this`) 298 299Group.link("@constant", g.Constant) -- constant identifiers 300--Group.link("@constant.builtin", g.UnknownThing) -- built-in constant values 301--Group.link("@constant.macro", g.UnknownThing) -- constants defined by the preprocessor 302 303Group.new("@namespace", c.namespace, c.none) -- modules or namespaces 304Group.link("@symbol", g.Special) -- symbols or atoms 305 306-- Text {{{2 307Group.link("@text", g.Normal) -- non-structured text 308Group.link("@text.strong", g.Normal) -- bold text 309Group.link("@text.emphasis", g.Normal) -- text with emphasis 310Group.link("@text.underline", g.Normal) -- underlined text 311Group.link("@text.strike", g.Normal) -- strikethrough text 312Group.link("@text.title", g.Normal) -- text that is part of a title 313Group.link("@text.literal", g.Normal) -- literal or verbatim text 314Group.link("@text.uri", g.UnknownThing) -- URIs (e.g. hyperlinks) 315Group.link("@text.math", g.UnknownThing) -- math environments (e.g. `$ ... $` in LaTeX) 316Group.link("@text.environment", g.UnknownThing) -- text environments of markup languages 317Group.link("@text.environment.name", g.UnknownThing) -- text indicating the type of an environment 318Group.link("@text.reference", g.Normal) -- text references, footnotes, citations, etc. 319 320 321-- I think the defaults are fine here? 322-- Group.link("@text.todo", g.TODO) -- todo notes 323Group.link("@text.note", g.Note) -- info notes 324Group.link("@text.warning", g.Warning) -- warning notes 325Group.link("@text.danger", g.Error) -- danger/error notes 326 327Group.link("@text.diff.add", g.DiffAdd) -- added text (for diff files) 328Group.link("@text.diff.delete", g.DiffDelete) -- deleted text (for diff files) 329 330-- Tags {{{2 331Group.link("@tag", g.Special) -- XML tag names 332Group.link("@tag.attribute", g.Special) -- XML tag attributes 333Group.link("@tag.delimiter", g.Special) -- XML tag delimiters 334 335-- Conceal {{{2 336--Group.link("@conceal", g.UnknownThing) -- for captures that are only used for concealing 337 338-- Spell {{{2 339--Group.link("@spell", g.UnknownThing) -- for defining regions to be spellchecked 340 341-- Non-standard 342-- @variable.global 343 344------------------------------------- 345 346-- Undocumented or invalid? 347Group.link("@annotation", g.UnknownThing) 348--Group.link("@parameter.reference", g.UnknownThing) 349 350Group.new("TODO", c.none, c.none) -- what even set this? 351 352-- TOSORT {{{1 353Group.new("WombatGreen", c.type, c.none, s.none) 354 355Group.link("NoiceCmdlineIcon", g.Normal) -- cmdline icon 356Group.link("NoiceCmdlinePopupBorder", g.Normal) -- cmdline border 357Group.link("NoiceCmdlineIconSearch", g.WombatGreen) -- search icon 358Group.link("NoiceCmdlinePopupBorderSearch", g.WombatGreen) -- search border 359 360Group.new("NoicePopupmenu", c.norm, c.error, s.none)