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