-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I've slowly added these highlight queries to my local overrides over time, and find them useful enough to suggest upstreaming:
(pat_name (variable) @variable.parameter)
(pat_field (field_name) @variable.parameter .)
(class_name (type) @attribute)
(class_import (type_name (type) @attribute))
; first type name after (optional) constraints is a class name
(derive_declaration (constraints)? . (type_name (type) @attribute))
; types before a '=>' operator are classes
((type_apply (type_name (type) @attribute)) . (type_operator) @operator
(#eq? @operator "=>"))
((type_name (type) @attribute) . (type_operator) @operator
(#eq? @operator "=>"))If you like them, I can raise a PR (definitely not an expert in queries if there's a better way to write them). Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

