This repository was archived by the owner on Apr 24, 2021. It is now read-only.
File tree 2 files changed +7
-2
lines changed
examples/example-project/src
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -136,3 +136,5 @@ let comp = <O.Comp key="12" second="abcc" v=12 />
136
136
137
137
let lll = List .make (3 , 4 )
138
138
139
+ let abc = "abc"
140
+
Original file line number Diff line number Diff line change @@ -513,14 +513,17 @@ let processCompletable ~findItems ~full ~package ~pos ~rawOpens
513
513
mkItem ~name ~kind: (kindToInt item) ~deprecated
514
514
~detail: (detail name item) ~docstring ~uri ~pos_lnum )
515
515
| Cpipe (pipe , partialName ) -> (
516
+ let stringModulePath = [" Js" ; " String2" ] in
516
517
let getModulePath path =
517
518
let rec loop (path : Path.t ) =
518
519
match path with
519
520
| Pident id -> [Ident. name id]
520
521
| Pdot (p , s , _ ) -> s :: loop p
521
522
| Papply _ -> []
522
523
in
523
- match loop path with _ :: rest -> List. rev rest | [] -> []
524
+ match path with
525
+ | Path. Pident id when Ident. name id = " string" -> stringModulePath
526
+ | _ -> ( match loop path with _ :: rest -> List. rev rest | [] -> [] )
524
527
in
525
528
let getLhsPath ~pipeId ~partialName =
526
529
match [pipeId] |> findItems ~exact: true with
@@ -537,7 +540,7 @@ let processCompletable ~findItems ~full ~package ~pos ~rawOpens
537
540
let lhsPath =
538
541
match pipe with
539
542
| PipeId pipeId -> getLhsPath ~pipe Id ~partial Name
540
- | PipeString -> Some ([ " Js " ; " String2 " ] , partialName)
543
+ | PipeString -> Some (stringModulePath , partialName)
541
544
in
542
545
let removePackageOpens modulePath =
543
546
match modulePath with
You can’t perform that action at this time.
0 commit comments