mirror of
https://github.com/helix-editor/helix.git
synced 2025-10-06 00:13:28 +02:00
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.
This commit is contained in:
@@ -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"
|
||||
|
Reference in New Issue
Block a user