diff options
author | Chickenkeeper | 2023-01-09 02:26:08 +0000 |
---|---|---|
committer | GitHub | 2023-01-09 02:26:08 +0000 |
commit | 486c3ab0d542f5d502eba4f97446bdeca71afefd (patch) | |
tree | 0500e2e17e7ff851b1e1d7230723cfd90b7c0acf | |
parent | c4b0eb835639d2c18d940cd0c55093a92169b432 (diff) |
Fix Broken Attribute Highlights (#5349)
* Update highlights.scm
* Update highlights.scm
* Update themes.md
-rw-r--r-- | book/src/themes.md | 4 | ||||
-rw-r--r-- | runtime/queries/rust/highlights.scm | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/book/src/themes.md b/book/src/themes.md index 0f94828e..015ec59b 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -140,6 +140,8 @@ We use a similar set of scopes as - `type` - Types - `builtin` - Primitive types provided by the language (`int`, `usize`) + - `enum` + - `variant` - `constructor` - `constant` (TODO: constant.other.placeholder for %v) @@ -202,6 +204,8 @@ We use a similar set of scopes as - `namespace` +- `special` + - `markup` - `heading` - `marker` diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 66058034..bf2fde49 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -231,13 +231,6 @@ ((identifier) @type (#match? @type "^[A-Z]")) -(attribute - (identifier) @_macro - arguments: (token_tree (identifier) @constant.numeric.integer) - (#eq? @_macro "derive") -) -@special - ; ------- ; Functions ; ------- @@ -270,6 +263,12 @@ ; --- (attribute + (identifier) @special + arguments: (token_tree (identifier) @type) + (#eq? @special "derive") +) + +(attribute (identifier) @function.macro) (attribute [ |