Skip to content

Commit

Permalink
Fix Broken Attribute Highlights (helix-editor#5349)
Browse files Browse the repository at this point in the history
* Update highlights.scm

* Update highlights.scm

* Update themes.md
  • Loading branch information
Chickenkeeper authored and Shafkath Shuhan committed Jan 24, 2023
1 parent b4bef1b commit c672620
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 4 additions & 0 deletions book/src/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -202,6 +204,8 @@ We use a similar set of scopes as

- `namespace`

- `special`

- `markup`
- `heading`
- `marker`
Expand Down
13 changes: 6 additions & 7 deletions runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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
; -------
Expand Down Expand Up @@ -269,6 +262,12 @@
; Macros
; ---

(attribute
(identifier) @special
arguments: (token_tree (identifier) @type)
(#eq? @special "derive")
)

(attribute
(identifier) @function.macro)
(attribute
Expand Down

0 comments on commit c672620

Please sign in to comment.