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
Refresh the TS groups.
algmyr.se
6 months ago
9f64b102
d655ed0a
+102
-81
1 changed file
expand all
collapse all
unified
split
lua
wombat_lua
wombat.lua
+102
-81
lua/wombat_lua/wombat.lua
···
23
23
24
24
---@diagnostic disable: undefined-global
25
25
local wombat = lush(function(injected_functions)
26
26
-
local sym = injected_functions.sym
26
26
+
local sym = injected_functions.sym
27
27
return {
28
28
-- General
29
29
Normal { fg = c.norm, bg = c.main_bg },
···
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
168
-- TOSORT
171
169
WombatGreen { fg = c.type, bg = c.none, gui = s.none },
172
170
···
189
187
-- Structured following:
190
188
-- https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights
191
189
192
192
-
-- Misc
193
193
-
-- @errors is TS errors. Wildly noisy if you enable it.
194
194
-
-- sym("@error") { ErrorMsg },
195
195
-
sym("@comment") { Comment }, -- line and block comments
196
196
-
-- sym("@none") { UnknownThing }, -- completely disable the highlight
197
197
-
-- sym("@preproc") { UnknownThing }, -- various preprocessor directives & shebangs
198
198
-
-- sym("@define") { UnknownThing }, -- preprocessor definition directives
199
199
-
sym("@operator") { Operator }, -- symbolic operators (e.g. `+` / `*`)
190
190
+
-- Identifiers
191
191
+
sym("@variable") { Identifier }, -- various variable names
192
192
+
--sym("@variable.builtin") {}, -- built-in variable names (e.g. `this`)
193
193
+
sym("@variable.parameter") { Normal }, -- parameters of a function
194
194
+
--sym("@variable.parameter.builtin") {}, -- special parameters (e.g. `_`, `it`)
195
195
+
--sym("@variable.member") {}, -- object and struct fields
196
196
+
197
197
+
sym("@constant") { Constant }, -- constant identifiers
198
198
+
--sym("@constant.builtin") {}, -- built-in constant values
199
199
+
--sym("@constant.macro") {}, -- constants defined by the preprocessor
200
200
201
201
-
-- Punctuation
202
202
-
sym("@punctuation.delimiter") { Special }, -- delimiters (e.g. `;` / `.` / `,`)
203
203
-
sym("@punctuation.bracket") { Special }, -- brackets (e.g. `()` / `{}` / `[]`)
204
204
-
sym("@punctuation.special") { Special }, -- special symbols (e.g. `{}` in string interpolation)
201
201
+
sym("@module") { fg = c.namespace, bg = c.none }, -- modules or namespaces
202
202
+
--sym("@module.builtin") {}, -- built-in modules or namespaces
203
203
+
sym("@label") { Label }, -- GOTO and other labels (e.g. `label:` in C), including heredoc labels
205
204
206
205
-- Literals
207
206
sym("@string") { String }, -- string literals
208
208
-
sym("@string.regex") { String }, -- regular expressions
207
207
+
--sym("@string.documentation") {}, -- string documenting code (e.g. Python docstrings)
208
208
+
sym("@string.regexp") { String }, -- regular expressions
209
209
sym("@string.escape") { StringEscape }, -- escape sequences
210
210
-
sym("@string.special") { String }, -- other special strings (e.g. dates
210
210
+
sym("@string.special") { String }, -- other special strings (e.g. dates)
211
211
+
sym("@string.special.symbol") { Special }, -- symbols or atoms
212
212
+
--sym("@string.special.url") {}, -- URIs (e.g. hyperlinks)
213
213
+
--sym("@string.special.path") {}, -- filenames
211
214
212
215
sym("@character") { Character }, -- character literals
213
213
-
sym("@character.special") { Character }, -- special characters (e.g. wildcards
216
216
+
sym("@character.special") { Character }, -- special characters (e.g. wildcards)
214
217
215
218
sym("@boolean") { Boolean }, -- boolean literals
216
219
sym("@number") { Number }, -- numeric literals
217
217
-
sym("@float") { Float }, -- floating-point number literals
220
220
+
sym("@number.float") { Float }, -- floating-point number literals
221
221
+
222
222
+
-- Types
223
223
+
sym("@type") { Type }, -- type or class definitions and annotations
224
224
+
sym("@type.builtin") { Type }, -- built-in types
225
225
+
--sym("@type.definition") {}, -- identifiers in type definitions (e.g. `typedef <type> <identifier>` in C)
226
226
+
227
227
+
--sym("@attribute") {}, -- attribute annotations (e.g. Python decorators, Rust lifetimes)
228
228
+
--sym("@attribute.builtin") {}, -- builtin annotations (e.g. `@property` in Python)
229
229
+
sym("@property") { Identifier }, -- the key in key/value pairs
230
230
+
sym("@property.toml") { Type },
231
231
+
sym("@property.jjconfig") { Type },
218
232
219
233
-- Functions
220
234
sym("@function") { Function }, -- function definitions
221
235
sym("@function.builtin") { Function }, -- built-in functions
222
222
-
-- sym("@function.call") { UnknownThing }, -- function calls
236
236
+
--sym("@function.call") {}, -- function calls
223
237
sym("@function.macro") { Function }, -- preprocessor macros
224
238
225
225
-
-- sym("@method") { Function }, -- method definitions
226
226
-
-- -- sym("@method.call") { UnknownThing }, -- method calls
239
239
+
--sym("@function.method") {}, -- method definitions
240
240
+
--sym("@function.method.call") {}, -- method calls
227
241
228
242
sym("@constructor") { Function }, -- constructor calls and definitions
229
229
-
sym("@parameter") { Normal }, -- parameters of a function
243
243
+
sym("@operator") { Operator }, -- symbolic operators (e.g. `+` / `*`)
230
244
231
245
-- Keywords
232
232
-
sym("@keyword") { Keyword }, -- various keywords
233
233
-
sym("@keyword.function") { Keyword }, -- keywords that define a function (e.g
234
234
-
sym("@keyword.operator") { Keyword }, -- operators that are English words (e.g
235
235
-
sym("@keyword.return") { Keyword }, -- keywords like `return` and `yield
246
246
+
sym("@keyword") { Keyword }, -- keywords not fitting into specific categories
247
247
+
--sym("@keyword.coroutine") {}, -- keywords related to coroutines (e.g. `go` in Go, `async/await` in Python)
248
248
+
sym("@keyword.function") { Keyword }, -- keywords that define a function (e.g. `func` in Go, `def` in Python)
249
249
+
sym("@keyword.operator") { Keyword }, -- operators that are English words (e.g. `and` / `or`)
250
250
+
sym("@keyword.import") { Include }, -- keywords for including or exporting modules (e.g. `import` / `from` in Python)
251
251
+
--sym("@keyword.type") {}, -- keywords describing namespaces and composite types (e.g. `struct`, `enum`)
252
252
+
--sym("@keyword.modifier") {}, -- keywords modifying other constructs (e.g. `const`, `static`, `public`)
253
253
+
sym("@keyword.repeat") { Repeat }, -- keywords related to loops (e.g. `for` / `while`)
254
254
+
sym("@keyword.return") { Keyword }, -- keywords like `return` and `yield`
255
255
+
--sym("@keyword.debug") {}, -- keywords related to debugging
256
256
+
sym("@keyword.exception") { Exception }, -- keywords related to exceptions (e.g. `throw` / `catch`)
257
257
+
258
258
+
sym("@keyword.conditional") { Conditional }, -- keywords related to conditionals (e.g. `if` / `else`)
259
259
+
--sym("@keyword.conditional.ternary") {},-- ternary operator (e.g. `?` / `:`)
260
260
+
261
261
+
--sym("@keyword.directive") {}, -- various preprocessor directives & shebangs
262
262
+
--sym("@keyword.directive.define") {}, -- preprocessor definition directives
236
263
237
237
-
sym("@conditional") { Conditional }, -- keywords related to conditionals (e.g
238
238
-
sym("@repeat") { Repeat }, -- keywords related to loops (e.g.
239
239
-
-- sym("@debug") { UnknownThing }, -- keywords related to debugging
240
240
-
sym("@label") { Label }, -- GOTO and other labels (e.g. `label:` in C)
241
241
-
sym("@include") { Include }, -- keywords for including modules (e.g. `
242
242
-
sym("@exception") { Exception }, -- keywords related to exceptions (e.g. `throw` / `catch`)
264
264
+
-- Punctuation
265
265
+
sym("@punctuation.delimiter") { Special }, -- delimiters (e.g. `;` / `.` / `,`)
266
266
+
sym("@punctuation.bracket") { Special }, -- brackets (e.g. `()` / `{}` / `[]`)
267
267
+
sym("@punctuation.special") { Special }, -- special symbols (e.g. `{}` in string interpolation)
268
268
+
269
269
+
-- Comments
270
270
+
sym("@comment") { Comment }, -- line and block comments
271
271
+
--sym("@comment.documentation") {},-- comments documenting code
272
272
+
273
273
+
sym("@comment.error") { Error }, -- error-type comments (e.g. `ERROR`, `FIXME`, `DEPRECATED`)
274
274
+
sym("@comment.warning") { Warning }, -- warning-type comments (e.g. `WARNING`, `FIX`, `HACK`)
275
275
+
sym("@comment.todo") { Todo }, -- todo-type comments (e.g. `TODO`, `WIP`)
276
276
+
sym("@comment.note") { Note }, -- note-type comments (e.g. `NOTE`, `INFO`, `XXX`)
243
277
244
244
-
-- Types
245
245
-
sym("@type") { Type }, -- type definitions and annotations
246
246
-
sym("@type.builtin") { Type }, -- built-in types
247
247
-
-- sym("@type.definition") { UnknownThing }, -- type definitions (e.g. `typedef` in C)
248
248
-
-- sym("@type.qualifier") { UnknownThing }, -- type qualifiers (e.g. `const`)
278
278
+
-- Markup
279
279
+
-- Mainly for markup languages.
280
280
+
--sym("@markup.strong") { Normal }, -- bold text
281
281
+
--sym("@markup.italic") { Normal }, -- italic text
282
282
+
--sym("@markup.strikethrough") { Normal }, -- struck-through text
283
283
+
--sym("@markup.underline") { Normal }, -- underlined text (only for literal underline markup!)
249
284
250
250
-
-- sym("@storageclass") { UnknownThing }, -- visibility/life-time modifiers
251
251
-
-- sym("@storageclass.lifetime") { UnknownThing }, -- life-time modifiers (e.g. `static`)
252
252
-
-- sym("@attribute") { UnknownThing }, -- attribute annotations
253
253
-
-- sym("@field") { UnknownThing }, -- object and struct fields
254
254
-
sym("@property") { Identifier }, -- similar to `@field`
255
255
-
sym("@property.toml") { Type },
256
256
-
sym("@property.jjconfig") { Type },
285
285
+
--sym("@markup.heading") {}, -- headings, titles (including markers)
286
286
+
--sym("@markup.heading.1") {}, -- top-level heading
287
287
+
--sym("@markup.heading.2") {}, -- section heading
288
288
+
--sym("@markup.heading.3") {}, -- subsection heading
289
289
+
--sym("@markup.heading.4") {}, -- and so on
290
290
+
--sym("@markup.heading.5") {}, -- and so forth
291
291
+
--sym("@markup.heading.6") {}, -- six levels ought to be enough for anybody
257
292
258
258
-
-- Identifiers
259
259
-
sym("@variable") { Identifier }, -- various variable names
260
260
-
-- sym("@variable.builtin") { UnknownThing }, -- built-in variable names
293
293
+
--sym("@markup.quote") {}, -- block quotes
294
294
+
--sym("@markup.math") {}, -- math environments (e.g. `$ ... $` in LaTeX)
261
295
262
262
-
sym("@constant") { Constant }, -- constant identifiers
263
263
-
-- sym("@constant.builtin") { UnknownThing }, -- built-in constant values
264
264
-
-- sym("@constant.macro") { UnknownThing }, -- constants defined by the preprocessor
296
296
+
--sym("@markup.link") {}, -- text references, footnotes, citations, etc.
297
297
+
--sym("@markup.link.label") {}, -- link, reference descriptions
298
298
+
--sym("@markup.link.url") {}, -- URL-style links
265
299
266
266
-
sym("@namespace") { fg = c.namespace, bg = c.none }, -- modules or namespaces
267
267
-
sym("@symbol") { Special }, -- symbols or atoms
300
300
+
--sym("@markup.raw") {}, -- literal or verbatim text (e.g. inline code)
301
301
+
--sym("@markup.raw.block") {}, -- literal or verbatim text as a stand-alone block
302
302
+
-- -- (use priority 90 for blocks with injections)
268
303
269
269
-
-- Text
270
270
-
sym("@text") { Normal }, -- non-structured text
271
271
-
sym("@text.strong") { Normal }, -- bold text
272
272
-
sym("@text.emphasis") { Normal }, -- text with emphasis
273
273
-
sym("@text.underline") { Normal }, -- underlined text
274
274
-
sym("@text.strike") { Normal }, -- strikethrough text
275
275
-
sym("@text.title") { Normal }, -- text that is part of a title
276
276
-
sym("@text.literal") { Normal }, -- literal or verbatim text
277
277
-
sym("@text.uri") { UnknownThing }, -- URIs (e.g. hyperlinks)
278
278
-
sym("@text.math") { UnknownThing }, -- math environments (e.g. `$ ... $` in LaTeX)
279
279
-
sym("@text.environment") { UnknownThing }, -- text environments of markup languages
280
280
-
sym("@text.environment.name") { UnknownThing }, -- text indicating the type of an environment
281
281
-
sym("@text.reference") { Normal }, -- text references, footnotes, citations, etc.
282
282
-
-- I think the defaults are fine here?
283
283
-
sym("@text.todo") { TODO }, -- todo notes
284
284
-
sym("@text.note") { Note }, -- info notes
285
285
-
sym("@text.warning") { Warning }, -- warning notes
286
286
-
sym("@text.danger") { Error }, -- danger/error notes
304
304
+
--sym("@markup.list") {}, -- list markers
305
305
+
--sym("@markup.list.checked") {}, -- checked todo-style list markers
306
306
+
--sym("@markup.list.unchecked") {}, -- unchecked todo-style list markers
287
307
288
288
-
sym("@text.diff.add") { DiffAdd }, -- added text (for diff files)
289
289
-
sym("@text.diff.delete") { DiffDelete }, -- deleted text (for diff
308
308
+
sym("@diff.plus") { DiffAdd }, -- added text (for diff files)
309
309
+
sym("@diff.minus") { DiffDelete }, -- deleted text (for diff files)
310
310
+
sym("@diff.delta") { DiffChange }, -- changed text (for diff files)
290
311
291
291
-
-- Tags
292
292
-
sym("@tag") { Special }, -- XML tag names
293
293
-
sym("@tag.attribute") { Special }, -- XML tag attributes
294
294
-
sym("@tag.delimiter") { Special }, -- XML tag delimiters
312
312
+
sym("@tag") { Special }, -- XML-style tag names (and similar)
313
313
+
--sym("@tag.builtin") {}, -- builtin tag names (e.g. HTML5 tags)
314
314
+
sym("@tag.attribute") { Special }, -- XML-style tag attributes
315
315
+
sym("@tag.delimiter") { Special }, -- XML-style tag delimiters
295
316
296
296
-
-- Conceal
297
297
-
-- sym("@conceal") { UnknownThing }, -- for captures that are only used for concealing
317
317
+
-- Non-highlighting captures
318
318
+
--sym("@conceal") {}, -- captures that are only meant to be concealed
298
319
299
299
-
-- Spell
300
300
-
-- sym("@spell") { UnknownThing }, -- for defining regions to be spellchecked
320
320
+
--sym("@spell") {}, -- for defining regions to be spellchecked
321
321
+
--sym("@nospell") {}, -- for defining regions that should NOT be spellchecked
301
322
}
302
323
end)
303
324