File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ let skipOptVariant text i =
69
69
Find JSX context ctx for component M to autocomplete id (already parsed) as a prop.
70
70
ctx ::= <M args id
71
71
arg ::= id | id = [?] val
72
- val ::= id | "abc" | 42 | optVariant {...} | optVariant (...) | [...]
72
+ val ::= id | "abc" | 42 | optVariant {...} | optVariant (...) | <...> | [...]
73
73
optVariant ::= a | A | #a | #A | _nothing_
74
74
*)
75
75
let findJsxContext text offset =
@@ -83,6 +83,9 @@ let findJsxContext text offset =
83
83
| ')' ->
84
84
let i1 = findBackSkippingCommentsAndStrings text '(' ')' (i - 1 ) 0 in
85
85
if i1 > 0 then beforeParen identsSeen i1 else None
86
+ | '>' ->
87
+ let i1 = findBackSkippingCommentsAndStrings text '<' '>' (i - 1 ) 0 in
88
+ if i1 > 0 then beforeValue identsSeen i1 else None
86
89
| ']' ->
87
90
let i1 = findBackSkippingCommentsAndStrings text '[' ']' (i - 1 ) 0 in
88
91
if i1 > 0 then beforeValue identsSeen i1 else None
Original file line number Diff line number Diff line change @@ -111,5 +111,11 @@ skipOptIdent
111
111
}]
112
112
113
113
Complete tests/src/Jsx.res 26:2
114
- []
114
+ [{
115
+ "label": "key",
116
+ "kind": 4,
117
+ "tags": [],
118
+ "detail": "string",
119
+ "documentation": null
120
+ }]
115
121
You can’t perform that action at this time.
0 commit comments