File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
tests/analysis_tests/tests/src/expected Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1265,4 +1265,9 @@ let completionPathFromMaybeBuiltin path =
12651265 | Some ("result" , _ ) -> Some [" Stdlib" ; " Result" ]
12661266 | Some ("dict" , _ ) -> Some [" Stdlib" ; " Dict" ]
12671267 | 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
7171 let js_null_undefined : t = Ldot (Lident " Js" , " null_undefined" )
7272
7373 (* 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" )
7575end
7676
7777module No_loc = struct
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ Resolved opens 1 Stdlib
66ContextPath Value[emailPattern]->
77ContextPath Value[emailPattern]
88Path emailPattern
9- CPPipe pathFromEnv:Stdlib.RegExp found:false
109Path Stdlib.RegExp.
1110[{
1211 "label": "RegExp.lastIndex",
You can’t perform that action at this time.
0 commit comments