Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/rust/highlights.scm')
| -rw-r--r-- | runtime/queries/rust/highlights.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm index cc8380cb..3a4448ba 100644 --- a/runtime/queries/rust/highlights.scm +++ b/runtime/queries/rust/highlights.scm @@ -79,7 +79,11 @@ ; Types ; ------- -(type_parameter +(type_parameters + (type_identifier) @type.parameter) +(constrained_type_parameter + left: (type_identifier) @type.parameter) +(optional_type_parameter name: (type_identifier) @type.parameter) ((type_arguments (type_identifier) @constant) (#match? @constant "^[A-Z_]+$")) @@ -112,7 +116,6 @@ ; Comments ; ------- -(shebang) @comment (line_comment) @comment.line (block_comment) @comment.block @@ -240,6 +243,10 @@ (type_cast_expression "as" @keyword.operator) +((generic_type + type: (type_identifier) @keyword) + (#eq? @keyword "use")) + [ (crate) (super) |