File tree Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Expand file tree Collapse file tree 4 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 2
2
- Fix issue in JSX autocomplete when the component is declared external.
3
3
- Fix jump-to-definition for uncurried calls.
4
4
- Fix issue where values for autocomplete were pulled from implementations instead of interfaces.
5
+ - Fix issue with autocomplete then punned props are used in JSX. E.g. ` <M foo ...> ` .
5
6
- Add autocompletion for object access of the form foo[ "bar"] .
6
7
7
8
## 1.1.3
Original file line number Diff line number Diff line change @@ -143,16 +143,16 @@ let findJsxContext text offset =
143
143
match ident.[0 ] with
144
144
| ('a' .. 'z' | 'A' .. 'Z' ) when i1 > = 1 && text.[i1 - 1 ] = '<' ->
145
145
Some (ident, identsSeen)
146
- | _ -> beforeIdent identsSeen (i1 - 1 )
146
+ | _ -> beforeIdent ~ident identsSeen (i1 - 1 )
147
147
else None
148
148
else None
149
- and beforeIdent identsSeen i =
149
+ and beforeIdent ~ ident identsSeen i =
150
150
let i = skipWhite text i in
151
151
if i > 0 then
152
152
match text.[i] with
153
153
| '?' -> fromEquals identsSeen (i - 1 )
154
154
| '=' -> fromEquals identsSeen i
155
- | _ -> loop identsSeen (i - 1 )
155
+ | _ -> (* punning *) loop (ident :: identsSeen) i
156
156
else None
157
157
and beforeParen identsSeen i =
158
158
let i = skipWhite text i in
Original file line number Diff line number Diff line change @@ -52,3 +52,5 @@ module Ext = {
52
52
let _ = (Ext .make , Ext .makeProps )
53
53
54
54
//^com <Ext al
55
+
56
+ //^com <M first
Original file line number Diff line number Diff line change @@ -134,13 +134,7 @@ Complete tests/src/Jsx.res 30:2
134
134
}]
135
135
136
136
Complete tests/src/Jsx.res 32:2
137
- [{
138
- "label": "key",
139
- "kind": 4,
140
- "tags": [],
141
- "detail": "string",
142
- "documentation": null
143
- }]
137
+ []
144
138
145
139
Complete tests/src/Jsx.res 34:2
146
140
[{
@@ -196,3 +190,24 @@ Complete tests/src/Jsx.res 52:2
196
190
"documentation": null
197
191
}]
198
192
193
+ Complete tests/src/Jsx.res 54:2
194
+ [{
195
+ "label": "second",
196
+ "kind": 4,
197
+ "tags": [],
198
+ "detail": "option<string>",
199
+ "documentation": null
200
+ }, {
201
+ "label": "fun",
202
+ "kind": 4,
203
+ "tags": [],
204
+ "detail": "option<string>",
205
+ "documentation": null
206
+ }, {
207
+ "label": "key",
208
+ "kind": 4,
209
+ "tags": [],
210
+ "detail": "string",
211
+ "documentation": null
212
+ }]
213
+
You can’t perform that action at this time.
0 commit comments