File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -110,9 +110,9 @@ let definition ~path ~pos ~debug =
110
110
&& posIsZero loc.loc_end
111
111
in
112
112
if skipLoc then None
113
- else
113
+ else
114
114
Some
115
- {Protocol. uri = Uri. toString uri; range = Utils. cmtLocToRange loc}
115
+ {Protocol. uri = Files. canonicalizeUri uri; range = Utils. cmtLocToRange loc}
116
116
| Some _ -> None ))
117
117
in
118
118
print_endline
@@ -132,7 +132,7 @@ let typeDefinition ~path ~pos ~debug =
132
132
| None -> None
133
133
| Some (uri , loc ) ->
134
134
Some
135
- {Protocol. uri = Uri. toString uri; range = Utils. cmtLocToRange loc}))
135
+ {Protocol. uri = Files. canonicalizeUri uri; range = Utils. cmtLocToRange loc}))
136
136
in
137
137
print_endline
138
138
(match maybeLocation with
Original file line number Diff line number Diff line change @@ -102,3 +102,5 @@ let classifySourceFile path =
102
102
if Filename. check_suffix path " .res" && exists path then Res
103
103
else if Filename. check_suffix path " .resi" && exists path then Resi
104
104
else Other
105
+
106
+ let canonicalizeUri uri = uri |> Uri. toPath |> Unix. realpath
You can’t perform that action at this time.
0 commit comments