Unnamed repository; edit this file 'description' to name the repository.
queries: Fix precedence of Rust for-loop keyword highlight
The `for` literal node is marked as a `keyword` since it can also show
up outside of for loops, like in `for<'a> fn(&'a T)`. The for loop
highlight which tags `keyword.control.repeat` needs to move lower in the
file than the `keyword` one to take precedence.
| -rw-r--r-- | runtime/queries/rust/highlights.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index 981896f9..a305c94e 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -210,10 +210,6 @@ ; Keywords ; ------- -(for_expression - "for" @keyword.control.repeat) -(gen_block "gen" @keyword.control) - "in" @keyword.control [ @@ -263,6 +259,10 @@ "async" ] @keyword +(for_expression + "for" @keyword.control.repeat) +(gen_block "gen" @keyword.control) + [ "struct" "enum" |