@@ -33,6 +33,26 @@
33(type_definition
33(type_definition
34 name: (type_identifier) @type)
34 name: (type_identifier) @type)
37+ name: (identifier) @type)
40+ name: (identifier) @type)
42+;; val/var definitions/declarations
45+ pattern: (identifier) @variable)
48+ pattern: (identifier) @variable)
51+ name: (identifier) @variable)
54+ name: (identifier) @variable)
36; method definition
56; method definition
38(class_definition
58(class_definition
@@ -48,7 +68,7 @@
48 (function_definition
68 (function_definition
49 name: (identifier) @function.method)))
69 name: (identifier) @function.method)))
51−; imports
71+; imports/exports
53(import_declaration
73(import_declaration
54 path: (identifier) @namespace)
74 path: (identifier) @namespace)
@@ -58,7 +78,15 @@
58 path: (identifier) @type) (#match? @type "^[A-Z]"))
78 path: (identifier) @type) (#match? @type "^[A-Z]"))
59((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
79((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
82+ path: (identifier) @namespace)
83+((stable_identifier (identifier) @namespace))
86+ path: (identifier) @type) (#match? @type "^[A-Z]"))
87+((stable_identifier (identifier) @type) (#match? @type "^[A-Z]"))
61−((import_selectors (identifier) @type) (#match? @type "^[A-Z]"))
89+((namespace_selectors (identifier) @type) (#match? @type "^[A-Z]"))
63; method invocation
91; method invocation
@@ -66,10 +94,17 @@
66(call_expression
94(call_expression
67 function: (identifier) @function)
95 function: (identifier) @function)
98+ function: (operator_identifier) @function)
69(call_expression
100(call_expression
70 function: (field_expression
101 function: (field_expression
71 field: (identifier) @function.method))
102 field: (identifier) @function.method))
105+ function: (field_expression
106+ field: (operator_identifier) @function.method))
73((call_expression
108((call_expression
74 function: (identifier) @variable.other.member)
109 function: (identifier) @variable.other.member)
75 (#match? @variable.other.member "^[A-Z]"))
110 (#match? @variable.other.member "^[A-Z]"))
@@ -87,9 +122,15 @@
87(function_definition
122(function_definition
88 name: (identifier) @function)
123 name: (identifier) @function)
126+ name: (operator_identifier) @function)
90(parameter
128(parameter
91 name: (identifier) @variable.parameter)
129 name: (identifier) @variable.parameter)
132+ name: (identifier) @variable.parameter)
93; expressions
134; expressions
@@ -109,7 +150,7 @@
111(symbol_literal) @string.special.symbol
152(symbol_literal) @string.special.symbol
115(character_literal)
156(character_literal)
@@ -118,29 +159,50 @@
119(interpolation "$" @punctuation.special)
160(interpolation "$" @punctuation.special)
164+(annotation) @attribute
121;; keywords
166;; keywords
168+;; storage in TextMate scope lingo means field or type
172+ (transparent_modifier)
124 "abstract"
174 "abstract"
130−;; `forSome` existential types not implemented yet
131 "implicit"
176 "implicit"
133−;; `macro` not implemented yet
135 "override"
178 "override"
137 "private"
179 "private"
138 "protected"
180 "protected"
182+] @keyword.storage.modifier
195+] @keyword.storage.type
202+;; `forSome` existential types not implemented yet
203+;; `macro` not implemented yet
145] @keyword
207] @keyword
@@ -152,33 +214,36 @@
152"new" @keyword.operator
214"new" @keyword.operator
161] @keyword.control.conditional
226] @keyword.control.conditional
170] @punctuation.bracket
235] @punctuation.bracket
175] @punctuation.delimiter
240] @punctuation.delimiter
182] @keyword.control.repeat
247] @keyword.control.repeat
184"def" @keyword.function
249"def" @keyword.function
@@ -191,6 +256,8 @@
192"import" @keyword.control.import
257"import" @keyword.control.import
259+"export" @keyword.control.import
194"return" @keyword.control.return
261"return" @keyword.control.return
196(comment) @comment
263(comment) @comment
@@ -200,4 +267,6 @@
200(case_block
267(case_block
201 (case_clause ("case") @keyword.control.conditional))
268 (case_clause ("case") @keyword.control.conditional))
203−(identifier) @variable
270+(identifier) @variable
272+(operator_identifier) @operator