From 355222f31428904ce7f575269b17b4b5f336aa79 Mon Sep 17 00:00:00 2001 From: fiplox Date: Sun, 5 Mar 2023 17:52:30 +0100 Subject: [PATCH] feat: add new TS highlight groups --- lua/neogruber/theme.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/neogruber/theme.lua b/lua/neogruber/theme.lua index ae6e822..2f24f4c 100644 --- a/lua/neogruber/theme.lua +++ b/lua/neogruber/theme.lua @@ -317,7 +317,7 @@ function theme.highlights(c, config) local treesitter = { -- 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'] = { fg = c.quartz }, -- Character literals: `'a'` in C. @@ -359,6 +359,8 @@ function theme.highlights(c, config) ['@keyword.operator'] = { fg = c.yellow }, -- Keywords like `return` and `yield`. ['@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. ['@label'] = { fg = c.yellow }, -- Method calls and definitions. @@ -435,10 +437,17 @@ function theme.highlights(c, config) ['@type'] = { fg = c.yellow, style = config.styles.storage_class }, -- Built-in types: `i32` in Rust. ['@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'] = { fg = c.fg, style = config.styles.variables }, -- Variable names defined by the language: `this` or `self` in Javascript. ['@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