fix: highlight `_` in `[_]` as `@comment.unused`

pull/13932/head
Nik Revenco 2025-07-11 03:21:45 +01:00
parent fd11bd26cb
commit 42db29a32d
1 changed files with 5 additions and 0 deletions

View File

@ -88,9 +88,14 @@
((type_arguments (type_identifier) @constant) ((type_arguments (type_identifier) @constant)
(#match? @constant "^[A-Z_]+$")) (#match? @constant "^[A-Z_]+$"))
(type_arguments (type_identifier) @type) (type_arguments (type_identifier) @type)
; `_` in `(_, _)`
(tuple_struct_pattern "_" @comment.unused) (tuple_struct_pattern "_" @comment.unused)
; `_` in `Vec<_>`
((type_arguments (type_identifier) @comment.unused) ((type_arguments (type_identifier) @comment.unused)
(#eq? @comment.unused "_")) (#eq? @comment.unused "_"))
; `_` in `Rc<[_]>`
((array_type (type_identifier) @comment.unused)
(#eq? @comment.unused "_"))
; --- ; ---
; Primitives ; Primitives