-
Notifications
You must be signed in to change notification settings - Fork 18
Commit d77653c
Highlight fixes (#241)
* Highlight variants as constructors
* Add set of built-in types
* Update @namespace to @module
It's what's in the neovim docs right now
* Update @parameter to @variable.parameter
* Update string interpolation and char
* Update parameter to @variable.parameter
* Update annotation to attribute
* Complete change of polyvar as constructors
* Specialize some of the keywords
* Move the => arrow to operators
This is how it's in the ecma parser (JS)
* Specialize ternary operator
* Highlight function name in bindings
* Highlight function calls
* Highlight members of records and modules
* Highlight unit as built-in constant
* Highlight labeled parameters names as properties
* Fix existing tests
* Fix pipe operator call highlighting to work with simple values too
* Add highlight tests for function names and calls
* Add tests for module and record members
* Change record field expression to member
* Add test for labeled argument as property
* Add test for unit highlight
* Adapt to new tree-sitter last match wins
* Move template highlight rule
* Add string interpolation test
* Remove member highlight as property
* Change highlight of variable from module
* Change highlight of destructured variables
* Change highlight of labeled arguments
* Fix highlight of variables in string interpolation
* Fix parameter highlights
* Move "as" to keyword.operator
* Move async/await to coroutine
* Fix test
* Add missing punctutation highlights
* Remove metadata from unit highlight
* (true) and (false) as boolean
---------
Co-authored-by: Pedro Castro <aspeddro@gmail.com>1 parent 5e2a44a commit d77653c
File tree
7 files changed
+179
-90
lines changed- queries/rescript
- test/highlight
7 files changed
+179
-90
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 | + | ||
11 | + | ||
12 | + | ||
10 | 13 |
| |
11 | 14 |
| |
12 | 15 |
| |
13 | 16 |
| |
14 | 17 |
| |
15 | 18 |
| |
16 | 19 |
| |
20 | + | ||
21 | + | ||
22 | + | ||
23 | + | ||
17 | 24 |
| |
18 | 25 |
| |
19 | 26 |
| |
20 | - | ||
27 | + | ||
21 | 28 |
| |
22 | 29 |
| |
23 | 30 |
| |
24 | 31 |
| |
25 | 32 |
| |
26 | - | ||
27 | - | ||
33 | + | ||
34 | + | ||
35 | + | ||
36 | + | ||
37 | + | ||
38 | + | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
28 | 52 |
| |
29 | 53 |
| |
30 | 54 |
| |
31 | 55 |
| |
32 | - | ||
33 | - | ||
56 | + | ||
57 | + | ||
34 | 58 |
| |
35 | 59 |
| |
36 | 60 |
| |
| |||
40 | 64 |
| |
41 | 65 |
| |
42 | 66 |
| |
43 | - | ||
44 | - | ||
45 | - | ||
46 | 67 |
| |
47 | - | ||
68 | + | ||
48 | 69 |
| |
49 | 70 |
| |
50 | 71 |
| |
| |||
53 | 74 |
| |
54 | 75 |
| |
55 | 76 |
| |
56 | - | ||
77 | + | ||
57 | 78 |
| |
58 | 79 |
| |
59 | - | ||
60 | - | ||
80 | + | ||
81 | + | ||
61 | 82 |
| |
62 | 83 |
| |
63 | 84 |
| |
64 | 85 |
| |
65 | 86 |
| |
66 | - | ||
67 | - | ||
68 | - | ||
69 | - | ||
87 | + | ||
88 | + | ||
89 | + | ||
70 | 90 |
| |
71 | 91 |
| |
72 | - | ||
92 | + | ||
73 | 93 |
| |
74 | 94 |
| |
75 | 95 |
| |
76 | - | ||
77 | - | ||
78 | - | ||
96 | + | ||
97 | + | ||
98 | + | ||
99 | + | ||
100 | + | ||
101 | + | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + | ||
111 | + | ||
112 | + | ||
113 | + | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | + | ||
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
122 | + | ||
79 | 123 |
| |
80 | 124 |
| |
81 | 125 |
| |
82 | 126 |
| |
83 | - | ||
127 | + | ||
84 | 128 |
| |
85 | 129 |
| |
86 | 130 |
| |
87 | 131 |
| |
88 | 132 |
| |
89 | 133 |
| |
90 | 134 |
| |
91 | - | ||
92 | - | ||
135 | + | ||
93 | 136 |
| |
94 | 137 |
| |
95 | - | ||
96 | - | ||
97 | - | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
98 | 152 |
| |
99 | 153 |
| |
154 | + | ||
155 | + | ||
100 | 156 |
| |
157 | + | ||
158 | + | ||
159 | + | ||
101 | 160 |
| |
102 | 161 |
| |
103 | 162 |
| |
104 | 163 |
| |
105 | - | ||
106 | - | ||
107 | - | ||
108 | - | ||
109 | - | ||
110 | 164 |
| |
111 | 165 |
| |
112 | - | ||
113 | 166 |
| |
114 | 167 |
| |
115 | 168 |
| |
116 | 169 |
| |
117 | - | ||
170 | + | ||
171 | + | ||
172 | + | ||
118 | 173 |
| |
119 | 174 |
| |
120 | 175 |
| |
| |||
123 | 178 |
| |
124 | 179 |
| |
125 | 180 |
| |
126 | - | ||
181 | + | ||
127 | 182 |
| |
128 | 183 |
| |
129 | 184 |
| |
130 | 185 |
| |
131 | 186 |
| |
132 | - | ||
187 | + | ||
133 | 188 |
| |
134 | 189 |
| |
135 | - | ||
136 | - | ||
190 | + | ||
191 | + | ||
137 | 192 |
| |
138 | 193 |
| |
139 | 194 |
| |
140 | 195 |
| |
141 | 196 |
| |
142 | 197 |
| |
143 | 198 |
| |
144 | - | ||
199 | + | ||
145 | 200 |
| |
146 | 201 |
| |
147 | 202 |
| |
148 | 203 |
| |
149 | 204 |
| |
205 | + | ||
150 | 206 |
| |
151 | 207 |
| |
152 | 208 |
| |
| |||
174 | 230 |
| |
175 | 231 |
| |
176 | 232 |
| |
233 | + | ||
177 | 234 |
| |
178 | 235 |
| |
179 | 236 |
| |
| |||
188 | 245 |
| |
189 | 246 |
| |
190 | 247 |
| |
248 | + | ||
249 | + | ||
191 | 250 |
| |
192 | 251 |
| |
252 | + | ||
253 | + | ||
254 | + | ||
255 | + | ||
256 | + | ||
257 | + | ||
193 | 258 |
| |
194 | 259 |
| |
195 | 260 |
| |
| |||
201 | 266 |
| |
202 | 267 |
| |
203 | 268 |
| |
204 | - | ||
205 | 269 |
| |
206 | 270 |
| |
207 | 271 |
| |
208 | 272 |
| |
209 | - | ||
273 | + | ||
210 | 274 |
| |
211 | 275 |
| |
212 | 276 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
| |
4 | 4 |
| |
5 | - | ||
5 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 | - | ||
12 | + | ||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 | - | ||
16 | + | ||
17 | 17 |
| |
18 | - | ||
19 | - | ||
18 | + | ||
19 | + | ||
20 | 20 |
| |
21 | 21 |
| |
22 | - | ||
22 | + | ||
23 | 23 |
| |
24 | 24 |
| |
25 | - | ||
25 | + | ||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 | - | ||
30 | + | ||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
38 | - | ||
38 | + | ||
39 | 39 |
| |
40 | 40 |
| |
41 | - | ||
41 | + | ||
42 | 42 |
| |
43 | 43 |
| |
44 | - | ||
44 | + | ||
45 | 45 |
| |
46 | 46 |
| |
47 | - | ||
47 | + | ||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
55 | 55 |
| |
56 | 56 |
| |
57 | 57 |
| |
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | ||
66 | + | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
80 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | - | ||
2 | + | ||
3 | 3 |
| |
4 | + | ||
4 | 5 |
| |
5 | 6 |
| |
6 | - | ||
7 | - | ||
8 | - | ||
9 | - | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
14 | 11 |
| |
15 | 12 |
| |
16 | - | ||
13 | + |
0 commit comments