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