feat: add new TS highlight groups

This commit is contained in:
fiplox 2023-03-05 17:52:30 +01:00
parent f55494a73d
commit 355222f314
1 changed files with 10 additions and 1 deletions

View File

@ -317,7 +317,7 @@ function theme.highlights(c, config)
local treesitter = { local treesitter = {
-- Annotations that can be attached to the code to denote some kind of meta information. e.g. C++/Dart attributes. -- Annotations that can be attached to the code to denote some kind of meta information. e.g. C++/Dart attributes.
['@attribute'] = { fg = c.yellow }, ['@attribute'] = { fg = c.wisteria1 },
-- Boolean literals: `True` and `False` in Python. -- Boolean literals: `True` and `False` in Python.
['@boolean'] = { fg = c.quartz }, ['@boolean'] = { fg = c.quartz },
-- Character literals: `'a'` in C. -- Character literals: `'a'` in C.
@ -359,6 +359,8 @@ function theme.highlights(c, config)
['@keyword.operator'] = { fg = c.yellow }, ['@keyword.operator'] = { fg = c.yellow },
-- Keywords like `return` and `yield`. -- Keywords like `return` and `yield`.
['@keyword.return'] = { fg = c.yellow }, ['@keyword.return'] = { fg = c.yellow },
-- keywords related to coroutines (e.g. `go` in Go, `async/await` in Python)
['@keyword.coroutine'] = { fg = c.yellow, style = 'bold' },
-- GOTO labels: `label:` in C, and `::label::` in Lua. -- GOTO labels: `label:` in C, and `::label::` in Lua.
['@label'] = { fg = c.yellow }, ['@label'] = { fg = c.yellow },
-- Method calls and definitions. -- Method calls and definitions.
@ -435,10 +437,17 @@ function theme.highlights(c, config)
['@type'] = { fg = c.yellow, style = config.styles.storage_class }, ['@type'] = { fg = c.yellow, style = config.styles.storage_class },
-- Built-in types: `i32` in Rust. -- Built-in types: `i32` in Rust.
['@type.builtin'] = { fg = c.quartz, style = config.styles.builtin }, ['@type.builtin'] = { fg = c.quartz, style = config.styles.builtin },
-- type definitions (e.g. `typedef` in C)
['@type.definition'] = { fg = c.quartz, style = config.styles.builtin },
-- type qualifiers (e.g. `const`)
['@type.qualifier'] = { fg = c.yellow, style = config.styles.storage_class },
-- Variable names that don't fit into other categories. -- Variable names that don't fit into other categories.
['@variable'] = { fg = c.fg, style = config.styles.variables }, ['@variable'] = { fg = c.fg, style = config.styles.variables },
-- Variable names defined by the language: `this` or `self` in Javascript. -- Variable names defined by the language: `this` or `self` in Javascript.
['@variable.builtin'] = { fg = c.wisteria, style = config.styles.variables }, ['@variable.builtin'] = { fg = c.wisteria, style = config.styles.variables },
-- modifiers that affect storage in memory or life-time
['@storageclass'] = { fg = c.red, style = config.styles.storage_class },
} }
return treesitter return treesitter