Skip to content

Commit 5702498

Browse files
committed
Fix highlighting
1 parent 5542c26 commit 5702498

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

queries/highlights.scm

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
(dict_pattern "dict" @type.builtin)
2323
(dict_entry (string) @property)
2424
(dict_pattern_entry (string) @property)
25+
(dict_pattern_entry (value_identifier) @variable.parameter)
26+
(parameter (dict_pattern (dict_pattern_entry (value_identifier) @variable.parameter)))
2527

2628
((type_identifier) @type.builtin
2729
(#any-of? @type.builtin
@@ -104,18 +106,18 @@
104106
(parameter (record_pattern (value_identifier) @variable.parameter))
105107

106108
; function identifier in let binding
107-
(let_binding
109+
(let_binding
108110
pattern: (value_identifier) @function
109111
body: (function))
110112

111113
; function calls
112114

113-
(call_expression
115+
(call_expression
114116
function: (value_identifier_path
115117
_
116118
(value_identifier) @function.call))
117119

118-
(call_expression
120+
(call_expression
119121
function: (value_identifier) @function.call)
120122

121123
; highlight the right-hand side of a pipe operator as a function call

test/highlight/functions.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,8 @@ let fn = (a, (b, c), {d, e}, [f, g]) => a + b + c + d + e + f + g
1111

1212
let get = async (id) => id
1313
// ^ keyword.coroutine
14+
15+
let getFromDict = (dict{"key": value}) => value
16+
// ^ type.builtin
17+
// ^ property
18+
// ^ variable.parameter

0 commit comments

Comments
 (0)