Skip to content

Commit

Permalink
Change highlight of destructured variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilios1995 committed May 26, 2024
1 parent 5643a94 commit 2f9044a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions queries/rescript/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@

(member_expression (property_identifier) @variable.member)

(record_pattern
(value_identifier) @variable.member)

(value_identifier_path
(module_identifier)
(value_identifier) @variable)


(record_pattern
(value_identifier_path
(value_identifier) @variable.member))

(record_pattern
(value_identifier) @variable)

(labeled_argument
label: (value_identifier) @property)

Expand Down
5 changes: 4 additions & 1 deletion test/highlight/expressions.res
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ let v = M.v
// ^variable

let {x} = y
// ^variable.member
// ^variable

let {X.x} = y
// ^variable.member

let x = y.x
// ^variable.member
Expand Down

0 comments on commit 2f9044a

Please sign in to comment.