tangled
alpha
login
or
join now
algmyr.se
/
vim-wombat-lua
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Port to lush.
algmyr.se
7 months ago
d414e87b
511bead3
+305
-316
4 changed files
expand all
collapse all
unified
split
colors
wombat_lua.lua
lua
wombat_lua
groups
treesitter.lua
init.lua
wombat.lua
+3
-2
colors/wombat_lua.lua
···
1
1
vim.opt.background = 'dark'
2
2
vim.g.colors_name = 'wombat_lua'
3
3
4
4
-
package.loaded.wombat_lua = nil
5
5
-
require('wombat_lua')
4
4
+
package.loaded['wombat_lua.wombat_template'] = nil
5
5
+
6
6
+
require('lush')(require('wombat_lua.wombat'))
-132
lua/wombat_lua/groups/treesitter.lua
···
1
1
-
local M = {}
2
2
-
3
3
-
function M.build(Group, c, g, s)
4
4
-
Group.new("UnknownThing", c.norm, c.unknown)
5
5
-
6
6
-
-- Structured following:
7
7
-
-- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights
8
8
-
9
9
-
-- Misc {{{1
10
10
-
-- @errors is TS errors. Wildly noisy if you enable it.
11
11
-
-- Group.link("@error", g.ErrorMsg) -- syntax/parser errors
12
12
-
Group.link("@comment", g.Comment) -- line and block comments
13
13
-
-- Group.link("@none", g.UnknownThing) -- completely disable the highlight
14
14
-
-- Group.link("@preproc", g.UnknownThing) -- various preprocessor directives & shebangs
15
15
-
-- Group.link("@define", g.UnknownThing) -- preprocessor definition directives
16
16
-
Group.link("@operator", g.Operator) -- symbolic operators (e.g. `+` / `*`)
17
17
-
18
18
-
-- Punctuation {{{1
19
19
-
Group.link("@punctuation.delimiter", g.Special) -- delimiters (e.g. `;` / `.` / `,`)
20
20
-
Group.link("@punctuation.bracket", g.Special) -- brackets (e.g. `()` / `{}` / `[]`)
21
21
-
Group.link("@punctuation.special", g.Special) -- special symbols (e.g. `{}` in string interpolation)
22
22
-
23
23
-
-- Literals {{{1
24
24
-
Group.link("@string", g.String) -- string literals
25
25
-
Group.link("@string.regex", g.String) -- regular expressions
26
26
-
Group.link("@string.escape", g.StringEscape) -- escape sequences
27
27
-
Group.link("@string.special", g.String) -- other special strings (e.g. dates)
28
28
-
29
29
-
Group.link("@character", g.Character) -- character literals
30
30
-
Group.link("@character.special", g.Character) -- special characters (e.g. wildcards)
31
31
-
32
32
-
Group.link("@boolean", g.Boolean) -- boolean literals
33
33
-
Group.link("@number", g.Number) -- numeric literals
34
34
-
Group.link("@float", g.Float) -- floating-point number literals
35
35
-
36
36
-
-- Functions {{{1
37
37
-
Group.link("@function", g.Function) -- function definitions
38
38
-
Group.link("@function.builtin", g.Function) -- built-in functions
39
39
-
-- Group.link("@function.call", g.UnknownThing) -- function calls
40
40
-
Group.link("@function.macro", g.Function) -- preprocessor macros
41
41
-
42
42
-
Group.link("@method", g.Function) -- method definitions
43
43
-
-- Group.link("@method.call", g.UnknownThing) -- method calls
44
44
-
45
45
-
Group.link("@constructor", g.Function) -- constructor calls and definitions
46
46
-
Group.link("@parameter", g.Normal) -- parameters of a function
47
47
-
48
48
-
-- Keywords {{{1
49
49
-
Group.link("@keyword", g.Keyword) -- various keywords
50
50
-
Group.link("@keyword.function", g.Keyword) -- keywords that define a function (e.g. `func` in Go, `def` in Python)
51
51
-
Group.link("@keyword.operator", g.Keyword) -- operators that are English words (e.g. `and` / `or`)
52
52
-
Group.link("@keyword.return", g.Keyword) -- keywords like `return` and `yield`
53
53
-
54
54
-
Group.link("@conditional", g.Conditional) -- keywords related to conditionals (e.g. `if` / `else`)
55
55
-
Group.link("@repeat", g.Repeat) -- keywords related to loops (e.g. `for` / `while`)
56
56
-
-- Group.link("@debug", g.UnknownThing) -- keywords related to debugging
57
57
-
Group.link("@label", g.Label) -- GOTO and other labels (e.g. `label:` in C)
58
58
-
Group.link("@include", g.Include) -- keywords for including modules (e.g. `import` / `from` in Python)
59
59
-
Group.link("@exception", g.Exception) -- keywords related to exceptions (e.g. `throw` / `catch`)
60
60
-
61
61
-
-- Types {{{1
62
62
-
Group.link("@type", g.Type) -- type or class definitions and annotations
63
63
-
Group.link("@type.builtin", g.Type) -- built-in types
64
64
-
-- Group.link("@type.definition", g.UnknownThing) -- type definitions (e.g. `typedef` in C)
65
65
-
-- Group.link("@type.qualifier", g.UnknownThing) -- type qualifiers (e.g. `const`)
66
66
-
67
67
-
-- Group.link("@storageclass", g.UnknownThing) -- visibility/life-time modifiers
68
68
-
-- Group.link("@storageclass.lifetime", g.UnknownThing) -- life-time modifiers (e.g. `static`)
69
69
-
-- Group.link("@attribute", g.UnknownThing) -- attribute annotations (e.g. Python decorators)
70
70
-
-- Group.link("@field", g.UnknownThing) -- object and struct fields
71
71
-
Group.link("@property", g.Identifier) -- similar to `@field`
72
72
-
Group.link("@property.toml", g.Type)
73
73
-
Group.link("@property.jjconfig", g.Type)
74
74
-
75
75
-
-- Identifiers {{{1
76
76
-
Group.link("@variable", g.Identifier) -- various variable names
77
77
-
-- Group.link("@variable.builtin", g.UnknownThing) -- built-in variable names (e.g. `this`)
78
78
-
79
79
-
Group.link("@constant", g.Constant) -- constant identifiers
80
80
-
-- Group.link("@constant.builtin", g.UnknownThing) -- built-in constant values
81
81
-
-- Group.link("@constant.macro", g.UnknownThing) -- constants defined by the preprocessor
82
82
-
83
83
-
Group.new("@namespace", c.namespace, c.none) -- modules or namespaces
84
84
-
Group.link("@symbol", g.Special) -- symbols or atoms
85
85
-
86
86
-
-- Text {{{1
87
87
-
Group.link("@text", g.Normal) -- non-structured text
88
88
-
Group.link("@text.strong", g.Normal) -- bold text
89
89
-
Group.link("@text.emphasis", g.Normal) -- text with emphasis
90
90
-
Group.link("@text.underline", g.Normal) -- underlined text
91
91
-
Group.link("@text.strike", g.Normal) -- strikethrough text
92
92
-
Group.link("@text.title", g.Normal) -- text that is part of a title
93
93
-
Group.link("@text.literal", g.Normal) -- literal or verbatim text
94
94
-
Group.link("@text.uri", g.UnknownThing) -- URIs (e.g. hyperlinks)
95
95
-
Group.link("@text.math", g.UnknownThing) -- math environments (e.g. `$ ... $` in LaTeX)
96
96
-
Group.link("@text.environment", g.UnknownThing) -- text environments of markup languages
97
97
-
Group.link("@text.environment.name", g.UnknownThing) -- text indicating the type of an environment
98
98
-
Group.link("@text.reference", g.Normal) -- text references, footnotes, citations, etc.
99
99
-
100
100
-
-- I think the defaults are fine here?
101
101
-
-- Group.link("@text.todo", g.TODO) -- todo notes
102
102
-
Group.link("@text.note", g.Note) -- info notes
103
103
-
Group.link("@text.warning", g.Warning) -- warning notes
104
104
-
Group.link("@text.danger", g.Error) -- danger/error notes
105
105
-
106
106
-
Group.link("@text.diff.add", g.DiffAdd) -- added text (for diff files)
107
107
-
Group.link("@text.diff.delete", g.DiffDelete) -- deleted text (for diff files)
108
108
-
109
109
-
-- Tags {{{1
110
110
-
Group.link("@tag", g.Special) -- XML tag names
111
111
-
Group.link("@tag.attribute", g.Special) -- XML tag attributes
112
112
-
Group.link("@tag.delimiter", g.Special) -- XML tag delimiters
113
113
-
114
114
-
-- Conceal {{{1
115
115
-
-- Group.link("@conceal", g.UnknownThing) -- for captures that are only used for concealing
116
116
-
117
117
-
-- Spell {{{1
118
118
-
-- Group.link("@spell", g.UnknownThing) -- for defining regions to be spellchecked
119
119
-
-- Other/Unknown {{{1
120
120
-
121
121
-
-- Non-standard
122
122
-
-- @variable.global
123
123
-
124
124
-
-- Undocumented or invalid?
125
125
-
Group.link("@annotation", g.UnknownThing)
126
126
-
--Group.link("@parameter.reference", g.UnknownThing)
127
127
-
-- }}}1
128
128
-
end
129
129
-
130
130
-
return M
131
131
-
132
132
-
-- vim: set fdm=marker:
-182
lua/wombat_lua/init.lua
···
1
1
-
local wombat_colors = require "wombat_lua.colors"
2
2
-
3
3
-
local Color = require("colorbuddy.init").Color
4
4
-
local Group = require("colorbuddy.init").Group
5
5
-
local c = require("colorbuddy.init").colors
6
6
-
local g = require("colorbuddy.init").groups
7
7
-
local s = require("colorbuddy.init").styles
8
8
-
9
9
-
for key, value in pairs(wombat_colors) do
10
10
-
Color.new(key, value)
11
11
-
end
12
12
-
13
13
-
-- General {{{1
14
14
-
Group.new("Normal", c.norm, c.main_bg)
15
15
-
Group.new("Cursor", c.main_bg, c.norm)
16
16
-
Group.new("Visual", c.none, c.visual_bg)
17
17
-
Group.new("VisualNOS", c.none, c.bg_very_subtle)
18
18
-
Group.new("Search", c.search, c.search_bg)
19
19
-
Group.new("Folded", c.fold, c.fold_bg)
20
20
-
Group.new("WinSeparator", c.norm_accent, c.bg_accent)
21
21
-
Group.new("LineNr", c.norm_accent, c.bg_accent, s.none)
22
22
-
Group.new("CursorLine", c.none, c.bg_very_subtle, s.none)
23
23
-
Group.new("CursorColumn", c.none, c.bg_very_subtle, s.none)
24
24
-
Group.new("ColorColumn", c.none, c.error, s.none)
25
25
-
Group.new("MatchParen", c.match_paren, c.match_paren_bg, s.bold)
26
26
-
Group.new("Title", c.bright_text, c.none, s.bold)
27
27
-
28
28
-
-- Pmenu (and pmenu scrollbar) {{{1
29
29
-
Group.new("Pmenu", c.norm, c.bg_accent, s.none)
30
30
-
Group.new("PmenuSel", c.norm, c.bg_very_subtle, s.bold)
31
31
-
--Group.new("PmenuSbar", c.norm, c.bg_subtle, s.none)
32
32
-
--Group.new("PmenuThumb", c.norm, c.bg_subtle, s.none)
33
33
-
34
34
-
-- Diff {{{1
35
35
-
Group.new("DiffAdd", c.none, c.diff_add)
36
36
-
Group.new("DiffDelete", c.none, c.diff_delete)
37
37
-
Group.new("DiffChange", c.none, c.diff_change)
38
38
-
Group.new("DiffText", c.none, c.none, s.underline + s.bold)
39
39
-
40
40
-
Group.new("VcsignsDiffTextAdd", c.none, c.diff_text_add)
41
41
-
Group.new("VcsignsDiffTextDelete", c.none, c.diff_text_delete)
42
42
-
43
43
-
-- Unsure why I have to specify the bg here,
44
44
-
-- seems the default uses the diff line color?
45
45
-
Group.new("SignAdd", c.sign_add, c.bg_accent, s.none)
46
46
-
Group.new("SignChange", c.sign_change, c.bg_accent, s.none)
47
47
-
Group.new("SignChangeDelete", c.sign_change_delete, c.bg_accent, s.none)
48
48
-
Group.new("SignDelete", c.sign_delete, c.bg_accent, s.none)
49
49
-
Group.new("SignDeleteFirstLine", c.sign_delete_first_line, c.bg_accent, s.none)
50
50
-
51
51
-
Group.link("SignifySignAdd", g.SignAdd)
52
52
-
Group.link("SignifySignChange", g.SignChange)
53
53
-
Group.link("SignifySignChangeDelete", g.SignChangeDelete)
54
54
-
Group.link("SignifySignDelete", g.SignDelete)
55
55
-
Group.link("SignifySignDeleteFirstLine", g.SignDeleteFirstLine)
56
56
-
57
57
-
Group.link("GitGutterAdd", g.SignAdd)
58
58
-
Group.link("GitGutterDelete", g.SignDelete)
59
59
-
Group.link("GitGutterChange", g.SignChange)
60
60
-
Group.link("GitGutterChangeDelete", g.SignChangeDelete)
61
61
-
62
62
-
-- Misc {{{1
63
63
-
Group.new("SpecialKey", c.mid_gray, c.none, s.none)
64
64
-
Group.new("Underlined", c.none, c.none, s.underline)
65
65
-
Group.new("Ignore", c.main_bg, c.none, s.none)
66
66
-
67
67
-
Group.new("Error", c.error, c.none, s.none)
68
68
-
Group.new("Warning", c.warning, c.none, s.none)
69
69
-
Group.new("Hint", c.annotation, c.none, s.none)
70
70
-
Group.new("Info", c.annotation, c.none, s.none)
71
71
-
72
72
-
Group.new("ErrorMsg", c.error, c.none, s.none)
73
73
-
Group.new("WarningMsg", c.warning, c.none, s.none)
74
74
-
Group.new("MoreMsg", c.mid_gray, c.none, s.none)
75
75
-
Group.link("ModeMsg", g.MoreMsg)
76
76
-
77
77
-
Group.new("NonText", c.non_text, c.none, s.none)
78
78
-
Group.new("Note", c.none, c.none, s.bold) -- e.g. TODO and FIXME
79
79
-
80
80
-
-- ? {{{1
81
81
-
--Group.new("Directory", c.dark_blue, c.none, s.none)
82
82
-
--Group.new("IncSearch", c.light_black, c.yellow, s.none)
83
83
-
--Group.new("CursorLineNr", c.purple, c.bg_very_subtle, s.none)
84
84
-
--Group.new("Question", c.unknown, c.none, s.none)
85
85
-
--Group.new("WildMenu", c.main_bg, c.norm, s.none)
86
86
-
--Group.new("Folded", c.medium_gray, c.none, s.none)
87
87
-
88
88
-
Group.new("SignColumn", c.none, c.bg_accent, s.none)
89
89
-
Group.new("FoldColumn", c.mid_gray, c.bg_accent, s.none)
90
90
-
91
91
-
--Group.new("TabLine", c.norm, c.bg_very_subtle, s.none)
92
92
-
--Group.new("TabLineSel", c.purple, c.bg_subtle, s.bold)
93
93
-
--Group.new("TabLineFill", c.norm, c.bg_very_subtle, s.none)
94
94
-
95
95
-
--Group.new("MatchParen", c.norm, c.bg_subtle, s.none)
96
96
-
--Group.new("qfLineNr", c.medium_gray, c.none, s.none)
97
97
-
--Group.new("htmlH1", c.norm, c.bg, s.none)
98
98
-
--Group.new("htmlH2", c.norm, c.bg, s.none)
99
99
-
--Group.new("htmlH3", c.norm, c.bg, s.none)
100
100
-
--Group.new("htmlH4", c.norm, c.bg, s.none)
101
101
-
--Group.new("htmlH5", c.norm, c.bg, s.none)
102
102
-
--Group.new("htmlH6", c.norm, c.bg, s.none)
103
103
-
104
104
-
-- Syntax - Main groups {{{1
105
105
-
Group.new("Statement", c.statement, c.none, s.none)
106
106
-
Group.link("Keyword", g.Statement)
107
107
-
Group.link("Conditional", g.Statement)
108
108
-
Group.link("Repeat", g.Statement)
109
109
-
Group.link("Label", g.Statement)
110
110
-
Group.link("Keyword", g.Statement)
111
111
-
Group.link("Exception", g.Statement)
112
112
-
113
113
-
Group.new("Constant", c.constant, c.none, s.none)
114
114
-
Group.link("Number", g.Constant)
115
115
-
Group.link("Boolean", g.Constant)
116
116
-
Group.link("Float", g.Constant)
117
117
-
118
118
-
Group.link("PreProc", g.Constant)
119
119
-
Group.link("Include", g.PreProc)
120
120
-
Group.link("Define", g.PreProc)
121
121
-
Group.link("Macro", g.PreProc)
122
122
-
Group.link("PreCondit", g.PreProc)
123
123
-
124
124
-
Group.new("Identifier", c.identifier, c.none, s.none)
125
125
-
Group.new("Function", c.func, c.none, s.none)
126
126
-
127
127
-
Group.new("Type", c.type, c.none, s.none)
128
128
-
Group.link("StorageClass", g.Type)
129
129
-
Group.link("Structure", g.Type)
130
130
-
Group.link("Typedef", g.Type)
131
131
-
132
132
-
Group.new("Special", c.special, c.none, s.none)
133
133
-
Group.link("SpecialChar", g.Special)
134
134
-
Group.link("Tag", g.Special)
135
135
-
Group.link("Delimiter", g.Special)
136
136
-
Group.link("SpecialComment", g.Special)
137
137
-
Group.link("Debug", g.Special)
138
138
-
139
139
-
Group.new("String", c.string, c.none)
140
140
-
Group.new("Character", c.character, c.none)
141
141
-
Group.new("StringEscape", c.escape, c.none)
142
142
-
143
143
-
Group.new("Comment", c.comment, c.none)
144
144
-
Group.new("Operator", c.operator, c.none)
145
145
-
Group.new("Todo", c.main_bg, c.todo)
146
146
-
147
147
-
Group.new("Noop", c.norm_accent, c.none, s.none)
148
148
-
Group.link("CocFadeOut", g.Noop)
149
149
-
150
150
-
Group.new("Annotation", c.annotation, c.none)
151
151
-
Group.link("LspInlayHint", g.NonText)
152
152
-
Group.link("CocInlayHint", g.NonText)
153
153
-
Group.link("DiagnosticHint", g.NonText)
154
154
-
155
155
-
Group.link("DiagnosticSignHint", g.Hint)
156
156
-
Group.link("DiagnosticSignInfo", g.Info)
157
157
-
Group.link("DiagnosticSignWarn", g.Warning)
158
158
-
Group.link("DiagnosticSignError", g.Error)
159
159
-
Group.link("DiagnosticHint", g.Hint)
160
160
-
Group.link("DiagnosticInfo", g.Info)
161
161
-
Group.link("DiagnosticWarn", g.Warning)
162
162
-
Group.link("DiagnosticError", g.Error)
163
163
-
Group.link("DiagnosticUnnecessary", g.NonText)
164
164
-
165
165
-
require("wombat_lua.groups.treesitter").build(Group, c, g, s)
166
166
-
167
167
-
Group.new("TODO", c.none, c.none) -- what even set this?
168
168
-
169
169
-
-- TOSORT {{{1
170
170
-
Group.new("WombatGreen", c.type, c.none, s.none)
171
171
-
172
172
-
Group.link("NoiceCmdlineIcon", g.Normal) -- cmdline icon
173
173
-
Group.link("NoiceCmdlinePopupBorder", g.Normal) -- cmdline border
174
174
-
Group.link("NoiceCmdlineIconSearch", g.WombatGreen) -- search icon
175
175
-
Group.link("NoiceCmdlinePopupBorderSearch", g.WombatGreen) -- search border
176
176
-
177
177
-
Group.new("NormalFloat", c.norm_accent, c.bg_accent)
178
178
-
179
179
-
Group.new("IblIndent", c.bg_more_subtle, c.none, s.none)
180
180
-
Group.new("IblScope", c.norm_accent, c.none, s.none)
181
181
-
182
182
-
-- vim: set fdm=marker:
+302
lua/wombat_lua/wombat.lua
···
1
1
+
local lush = require "lush"
2
2
+
3
3
+
local c = require "wombat_lua.colors"
4
4
+
5
5
+
local s = {
6
6
+
none = "none ", -- ok?
7
7
+
bold = "bold ",
8
8
+
italic = "italic ",
9
9
+
underline = "underline ",
10
10
+
underlineline = "underlineline ",
11
11
+
underdouble = "underdouble ",
12
12
+
undercurl = "undercurl ",
13
13
+
underdot = "underdot ",
14
14
+
underdotted = "underdotted ",
15
15
+
underdash = "underdash ",
16
16
+
underdashed = "underdashed ",
17
17
+
strikethrough = "strikethrough ",
18
18
+
altfont = "altfont ",
19
19
+
reverse = "reverse ",
20
20
+
standout = "standout ",
21
21
+
nocombine = "nocombine ",
22
22
+
}
23
23
+
24
24
+
---@diagnostic disable: undefined-global
25
25
+
local wombat = lush(function(injected_functions)
26
26
+
local sym = injected_functions.sym
27
27
+
return {
28
28
+
-- General
29
29
+
Normal { fg = c.norm, bg = c.main_bg },
30
30
+
Cursor { fg = c.main_bg, bg = c.norm },
31
31
+
Visual { fg = c.none, bg = c.visual_bg },
32
32
+
VisualNOS { fg = c.none, bg = c.bg_very_subtle },
33
33
+
Search { fg = c.search, bg = c.search_bg },
34
34
+
Folded { fg = c.fold, bg = c.fold_bg },
35
35
+
WinSeparator { fg = c.norm_accent, bg = c.bg_accent },
36
36
+
LineNr { fg = c.norm_accent, bg = c.bg_accent, gui = s.none },
37
37
+
CursorLine { fg = c.none, bg = c.bg_very_subtle, gui = s.none },
38
38
+
CursorColumn { fg = c.none, bg = c.bg_very_subtle, gui = s.none },
39
39
+
ColorColumn { fg = c.none, bg = c.error, gui = s.none },
40
40
+
MatchParen { fg = c.match_paren, bg = c.match_paren_bg, gui = s.bold },
41
41
+
Title { fg = c.bright_text, bg = c.none, gui = s.bold },
42
42
+
43
43
+
-- Pmenu (and pmenu scrollbar)
44
44
+
Pmenu { fg = c.norm, bg = c.bg_accent, gui = s.none },
45
45
+
PmenuSel { fg = c.norm, bg = c.bg_very_subtle, gui = s.bold },
46
46
+
-- PmenuSbar { fg=c.norm, bg=c.bg_subtle, gui = s.none},
47
47
+
-- PmenuThumb { fg=c.norm, bg=c.bg_subtle, gui = s.none},
48
48
+
49
49
+
-- Diff
50
50
+
DiffAdd { fg = c.none, bg = c.diff_add },
51
51
+
DiffDelete { fg = c.none, bg = c.diff_delete },
52
52
+
DiffChange { fg = c.none, bg = c.diff_change },
53
53
+
DiffText { fg = c.none, bg = c.none, gui = s.underline .. s.bold },
54
54
+
55
55
+
VcsignsDiffTextAdd { fg = c.none, bg = c.diff_text_add },
56
56
+
VcsignsDiffTextDelete { fg = c.none, bg = c.diff_text_delete },
57
57
+
-- Unsure why I have to specify the bg here,
58
58
+
-- seems the default uses the diff line color?
59
59
+
SignAdd { fg = c.sign_add, bg = c.bg_accent, gui = s.none },
60
60
+
SignChange { fg = c.sign_change, bg = c.bg_accent, gui = s.none },
61
61
+
SignChangeDelete {
62
62
+
fg = c.sign_change_delete,
63
63
+
bg = c.bg_accent,
64
64
+
gui = s.none,
65
65
+
},
66
66
+
SignDelete { fg = c.sign_delete, bg = c.bg_accent, gui = s.none },
67
67
+
SignDeleteFirstLine {
68
68
+
fg = c.sign_delete_first_line,
69
69
+
bg = c.bg_accent,
70
70
+
gui = s.none,
71
71
+
},
72
72
+
73
73
+
SignifySignAdd { SignAdd },
74
74
+
SignifySignChange { SignChange },
75
75
+
SignifySignChangeDelete { SignChangeDelete },
76
76
+
SignifySignDelete { SignDelete },
77
77
+
SignifySignDeleteFirstLine { SignDeleteFirstLine },
78
78
+
79
79
+
GitGutterAdd { SignAdd },
80
80
+
GitGutterDelete { SignDelete },
81
81
+
GitGutterChange { SignChange },
82
82
+
GitGutterChangeDelete { SignChangeDelete },
83
83
+
84
84
+
-- Misc
85
85
+
SpecialKey { fg = c.mid_gray, bg = c.none, gui = s.none },
86
86
+
Underlined { fg = c.none, bg = c.none, gui = s.underline .. s.bold },
87
87
+
Ignore { fg = c.main_bg, bg = c.none, gui = s.none },
88
88
+
89
89
+
Error { fg = c.error, bg = c.none, gui = s.none },
90
90
+
Warning { fg = c.warning, bg = c.none, gui = s.none },
91
91
+
Hint { fg = c.annotation, bg = c.none, gui = s.none },
92
92
+
Info { fg = c.annotation, bg = c.none, gui = s.none },
93
93
+
94
94
+
ErrorMsg { fg = c.error, bg = c.none, gui = s.none },
95
95
+
WarningMsg { fg = c.warning, bg = c.none, gui = s.none },
96
96
+
MoreMsg { fg = c.mid_gray, bg = c.none, gui = s.none },
97
97
+
ModeMsg { MoreMsg },
98
98
+
99
99
+
NonText { fg = c.non_text, bg = c.none, gui = s.none },
100
100
+
Note { fg = c.none, bg = c.none, gui = s.bold }, --
101
101
+
102
102
+
-- ?
103
103
+
SignColumn { fg = c.mid_gray, bg = c.bg_accent, gui = s.none },
104
104
+
FoldColumn { fg = c.mid_gray, bg = c.bg_accent, gui = s.none },
105
105
+
106
106
+
-- Syntax - Main groups
107
107
+
Statement { fg = c.statement, bg = c.none, gui = s.none },
108
108
+
Keyword { Statement },
109
109
+
Conditional { Statement },
110
110
+
Repeat { Statement },
111
111
+
Label { Statement },
112
112
+
Exception { Statement },
113
113
+
114
114
+
Constant { fg = c.constant, bg = c.none, gui = s.none },
115
115
+
Number { Constant },
116
116
+
Boolean { Constant },
117
117
+
Float { Constant },
118
118
+
119
119
+
PreProc { Constant },
120
120
+
Include { PreProc },
121
121
+
Define { PreProc },
122
122
+
Macro { PreProc },
123
123
+
PreCondit { PreProc },
124
124
+
125
125
+
Identifier { fg = c.identifier, bg = c.none, gui = s.none },
126
126
+
Function { fg = c.func, bg = c.none, gui = s.none },
127
127
+
128
128
+
Type { fg = c.type, bg = c.none, gui = s.none },
129
129
+
StorageClass { Type },
130
130
+
Structure { Type },
131
131
+
Typedef { Type },
132
132
+
133
133
+
Special { fg = c.special, bg = c.none, gui = s.none },
134
134
+
SpecialChar { Special },
135
135
+
Tag { Special },
136
136
+
Delimiter { Special },
137
137
+
SpecialComment { Special },
138
138
+
Debug { Special },
139
139
+
140
140
+
String { fg = c.string, bg = c.none },
141
141
+
Character { fg = c.character, bg = c.none },
142
142
+
StringEscape { fg = c.escape, bg = c.none },
143
143
+
144
144
+
Comment { fg = c.comment, bg = c.none },
145
145
+
Operator { fg = c.operator, bg = c.none },
146
146
+
Todo { fg = c.main_bg, bg = c.todo },
147
147
+
148
148
+
Noop { fg = c.norm_accent, bg = c.none, gui = s.none },
149
149
+
CocFadeOut { Noop },
150
150
+
151
151
+
Annotation { fg = c.annotation, bg = c.none },
152
152
+
LspInlayHint { NonText },
153
153
+
CocInlayHint { NonText },
154
154
+
DiagnosticHint { NonText },
155
155
+
156
156
+
DiagnosticSignHint { Hint },
157
157
+
DiagnosticSignInfo { Info },
158
158
+
DiagnosticSignWarn { Warning },
159
159
+
DiagnosticSignError { Error },
160
160
+
DiagnosticHint { Hint },
161
161
+
DiagnosticInfo { Info },
162
162
+
DiagnosticWarn { Warning },
163
163
+
DiagnosticError { Error },
164
164
+
DiagnosticUnnecessary { NonText },
165
165
+
166
166
+
-- require("wombat_lua.groups.treesitter").build(Group, c, g, s)
167
167
+
168
168
+
TODO { fg = c.todo, bg = c.none },
169
169
+
170
170
+
-- TOSORT
171
171
+
WombatGreen { fg = c.type, bg = c.none, gui = s.none },
172
172
+
173
173
+
NoiceCmdlineIcon { Normal },
174
174
+
NoiceCmdlinePopupBorder { Normal },
175
175
+
NoiceCmdlineIconSearch { WombatGreen },
176
176
+
NoiceCmdlinePopupBorderSearch { WombatGreen },
177
177
+
178
178
+
NormalFloat { fg = c.norm_accent, bg = c.bg_accent },
179
179
+
180
180
+
IblIndent { fg = c.bg_more_subtle, bg = c.none, gui = s.none },
181
181
+
IblScope { fg = c.norm_accent, bg = c.none, gui = s.none },
182
182
+
183
183
+
-- Treesitter
184
184
+
UnknownThing { fg = c.norm, bg = c.unknown },
185
185
+
-- Structured following:
186
186
+
-- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights
187
187
+
188
188
+
-- Misc
189
189
+
-- @errors is TS errors. Wildly noisy if you enable it.
190
190
+
-- sym("@error") { ErrorMsg },
191
191
+
sym("@comment") { Comment }, -- line and block comments
192
192
+
-- sym("@none") { UnknownThing }, -- completely disable the highlight
193
193
+
-- sym("@preproc") { UnknownThing }, -- various preprocessor directives & shebangs
194
194
+
-- sym("@define") { UnknownThing }, -- preprocessor definition directives
195
195
+
sym("@operator") { Operator }, -- symbolic operators (e.g. `+` / `*`)
196
196
+
197
197
+
-- Punctuation
198
198
+
sym("@punctuation.delimiter") { Special }, -- delimiters (e.g. `;` / `.` / `,`)
199
199
+
sym("@punctuation.bracket") { Special }, -- brackets (e.g. `()` / `{}` / `[]`)
200
200
+
sym("@punctuation.special") { Special }, -- special symbols (e.g. `{}` in string interpolation)
201
201
+
202
202
+
-- Literals
203
203
+
sym("@string") { String }, -- string literals
204
204
+
sym("@string.regex") { String }, -- regular expressions
205
205
+
sym("@string.escape") { StringEscape }, -- escape sequences
206
206
+
sym("@string.special") { String }, -- other special strings (e.g. dates
207
207
+
208
208
+
sym("@character") { Character }, -- character literals
209
209
+
sym("@character.special") { Character }, -- special characters (e.g. wildcards
210
210
+
211
211
+
sym("@boolean") { Boolean }, -- boolean literals
212
212
+
sym("@number") { Number }, -- numeric literals
213
213
+
sym("@float") { Float }, -- floating-point number literals
214
214
+
215
215
+
-- Functions
216
216
+
sym("@function") { Function }, -- function definitions
217
217
+
sym("@function.builtin") { Function }, -- built-in functions
218
218
+
-- sym("@function.call") { UnknownThing }, -- function calls
219
219
+
sym("@function.macro") { Function }, -- preprocessor macros
220
220
+
221
221
+
-- sym("@method") { Function }, -- method definitions
222
222
+
-- -- sym("@method.call") { UnknownThing }, -- method calls
223
223
+
224
224
+
sym("@constructor") { Function }, -- constructor calls and definitions
225
225
+
sym("@parameter") { Normal }, -- parameters of a function
226
226
+
227
227
+
-- Keywords
228
228
+
sym("@keyword") { Keyword }, -- various keywords
229
229
+
sym("@keyword.function") { Keyword }, -- keywords that define a function (e.g
230
230
+
sym("@keyword.operator") { Keyword }, -- operators that are English words (e.g
231
231
+
sym("@keyword.return") { Keyword }, -- keywords like `return` and `yield
232
232
+
233
233
+
sym("@conditional") { Conditional }, -- keywords related to conditionals (e.g
234
234
+
sym("@repeat") { Repeat }, -- keywords related to loops (e.g.
235
235
+
-- sym("@debug") { UnknownThing }, -- keywords related to debugging
236
236
+
sym("@label") { Label }, -- GOTO and other labels (e.g. `label:` in C)
237
237
+
sym("@include") { Include }, -- keywords for including modules (e.g. `
238
238
+
sym("@exception") { Exception }, -- keywords related to exceptions (e.g. `throw` / `catch`)
239
239
+
240
240
+
-- Types
241
241
+
sym("@type") { Type }, -- type definitions and annotations
242
242
+
sym("@type.builtin") { Type }, -- built-in types
243
243
+
-- sym("@type.definition") { UnknownThing }, -- type definitions (e.g. `typedef` in C)
244
244
+
-- sym("@type.qualifier") { UnknownThing }, -- type qualifiers (e.g. `const`)
245
245
+
246
246
+
-- sym("@storageclass") { UnknownThing }, -- visibility/life-time modifiers
247
247
+
-- sym("@storageclass.lifetime") { UnknownThing }, -- life-time modifiers (e.g. `static`)
248
248
+
-- sym("@attribute") { UnknownThing }, -- attribute annotations
249
249
+
-- sym("@field") { UnknownThing }, -- object and struct fields
250
250
+
sym("@property") { Identifier }, -- similar to `@field`
251
251
+
sym("@property.toml") { Type },
252
252
+
sym("@property.jjconfig") { Type },
253
253
+
254
254
+
-- Identifiers
255
255
+
sym("@variable") { Identifier }, -- various variable names
256
256
+
-- sym("@variable.builtin") { UnknownThing }, -- built-in variable names
257
257
+
258
258
+
sym("@constant") { Constant }, -- constant identifiers
259
259
+
-- sym("@constant.builtin") { UnknownThing }, -- built-in constant values
260
260
+
-- sym("@constant.macro") { UnknownThing }, -- constants defined by the preprocessor
261
261
+
262
262
+
sym("@namespace") { fg = c.namespace, bg = c.none }, -- modules or namespaces
263
263
+
sym("@symbol") { Special }, -- symbols or atoms
264
264
+
265
265
+
-- Text
266
266
+
sym("@text") { Normal }, -- non-structured text
267
267
+
sym("@text.strong") { Normal }, -- bold text
268
268
+
sym("@text.emphasis") { Normal }, -- text with emphasis
269
269
+
sym("@text.underline") { Normal }, -- underlined text
270
270
+
sym("@text.strike") { Normal }, -- strikethrough text
271
271
+
sym("@text.title") { Normal }, -- text that is part of a title
272
272
+
sym("@text.literal") { Normal }, -- literal or verbatim text
273
273
+
sym("@text.uri") { UnknownThing }, -- URIs (e.g. hyperlinks)
274
274
+
sym("@text.math") { UnknownThing }, -- math environments (e.g. `$ ... $` in LaTeX)
275
275
+
sym("@text.environment") { UnknownThing }, -- text environments of markup languages
276
276
+
sym("@text.environment.name") { UnknownThing }, -- text indicating the type of an environment
277
277
+
sym("@text.reference") { Normal }, -- text references, footnotes, citations, etc.
278
278
+
-- I think the defaults are fine here?
279
279
+
sym("@text.todo") { TODO }, -- todo notes
280
280
+
sym("@text.note") { Note }, -- info notes
281
281
+
sym("@text.warning") { Warning }, -- warning notes
282
282
+
sym("@text.danger") { Error }, -- danger/error notes
283
283
+
284
284
+
sym("@text.diff.add") { DiffAdd }, -- added text (for diff files)
285
285
+
sym("@text.diff.delete") { DiffDelete }, -- deleted text (for diff
286
286
+
287
287
+
-- Tags
288
288
+
sym("@tag") { Special }, -- XML tag names
289
289
+
sym("@tag.attribute") { Special }, -- XML tag attributes
290
290
+
sym("@tag.delimiter") { Special }, -- XML tag delimiters
291
291
+
292
292
+
-- Conceal
293
293
+
-- sym("@conceal") { UnknownThing }, -- for captures that are only used for concealing
294
294
+
295
295
+
-- Spell
296
296
+
-- sym("@spell") { UnknownThing }, -- for defining regions to be spellchecked
297
297
+
}
298
298
+
end)
299
299
+
300
300
+
return wombat
301
301
+
302
302
+
-- vim: set fdm=marker: