File tree 3 files changed +7
-3
lines changed
tests/analysis_tests/tests/src/expected
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1265,4 +1265,9 @@ let completionPathFromMaybeBuiltin path =
1265
1265
| Some ("result" , _ ) -> Some [" Stdlib" ; " Result" ]
1266
1266
| Some ("dict" , _ ) -> Some [" Stdlib" ; " Dict" ]
1267
1267
| Some ("char" , _ ) -> Some [" Stdlib" ; " Char" ]
1268
- | _ -> None
1268
+ | _ -> (
1269
+ match path |> Utils. expandPath |> List. rev with
1270
+ | [mainModule; " t" ] when String. starts_with ~prefix: " Stdlib_" mainModule ->
1271
+ (* Route Stdlib_X to Stdlib.X for proper completions without the Stdlib_ prefix *)
1272
+ Some (String. split_on_char '_' mainModule)
1273
+ | _ -> None )
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ module Lid = struct
71
71
let js_null_undefined : t = Ldot (Lident " Js" , " null_undefined" )
72
72
73
73
(* FIXME: Use primitive module *)
74
- let js_re_id : t = Ldot (Lident " RegExp " , " t" )
74
+ let js_re_id : t = Ldot (Lident " Stdlib_RegExp " , " t" )
75
75
end
76
76
77
77
module No_loc = struct
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ Resolved opens 1 Stdlib
6
6
ContextPath Value[emailPattern]->
7
7
ContextPath Value[emailPattern]
8
8
Path emailPattern
9
- CPPipe pathFromEnv:Stdlib.RegExp found:false
10
9
Path Stdlib.RegExp.
11
10
[{
12
11
"label": "RegExp.lastIndex",
You can’t perform that action at this time.
0 commit comments