File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ let locItemForPos ~full pos =
27
27
| _ :: _ :: _ :: l :: _ when full.file.uri |> Uri2. isInterface ->
28
28
(* heuristic for makeProps in interface files *)
29
29
Some l
30
+ | [
31
+ {locType = Typed (" fragment" , _, _)};
32
+ {locType = Typed (" createElement" , _, _)};
33
+ ] ->
34
+ (* heuristic for </Comp> within a fragment *)
35
+ None
36
+ | {locType = Typed (" makeProps" , _, _)}
37
+ :: ({locType = Typed (" make" , _, _)} as l2) :: _ ->
38
+ (* heuristic for </Comp> within fragments: take make as makeProps does not work
39
+ the type is not greatl but jump to definition works *)
40
+ Some l2
30
41
| [({locType = Typed (_, _, LocalReference _)} as li1); li3]
31
42
when li1.loc = li3.loc ->
32
43
(* JSX and compiler combined:
Original file line number Diff line number Diff line change
1
+ module SectionHeader = {
2
+ @react.component
3
+ let make = (~children ) => children
4
+ }
5
+
6
+
7
+ let z1 = <> <SectionHeader > {React .string ("abc" )} </SectionHeader > </>
8
+ // ^hov
9
+
10
+ let z2 = <> <SectionHeader > {React .string ("abc" )} </SectionHeader > </>
11
+ // ^hov
Original file line number Diff line number Diff line change
1
+ Hover tests/src/Fragment.res 6:19
2
+ {"contents": "```rescript\n{\"children\": 'children} => 'children\n```"}
3
+
4
+ Hover tests/src/Fragment.res 9:56
5
+ null
6
+
You can’t perform that action at this time.
0 commit comments