this repo has no description

Refresh the TS groups.

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