Skip to content

Commit

Permalink
[rust highlights] fix scoped attribute macro matching (helix-editor#4659
Browse files Browse the repository at this point in the history
)

Without this scoped attribute macros are not matched as macros.
Eg
```
  #[path::macro]
```
  • Loading branch information
theli-ua authored and Frederik Vestre committed Feb 6, 2023
1 parent 1e69eea commit cba1d91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,11 @@
(meta_item
(identifier) @function.macro)
(attr_item
(identifier) @function.macro
[
(identifier) @function.macro
(scoped_identifier
name: (identifier) @function.macro)
]
(token_tree (identifier) @function.macro)?)

(inner_attribute_item) @attribute
Expand Down

0 comments on commit cba1d91

Please sign in to comment.