Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 3946fba

Browse files
committed
Pipe autocomplete for builtin list type.
Fixes #98
1 parent bad6e78 commit 3946fba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/NewCompletions.ml

+2
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ let processCompletable ~findItems ~full ~package ~pos ~rawOpens
514514
~detail:(detail name item) ~docstring ~uri ~pos_lnum)
515515
| Cpipe (pipe, partialName) -> (
516516
let arrayModulePath = ["Js"; "Array2"] in
517+
let listModulePath = ["Belt"; "List"] in
517518
let optionModulePath = ["Belt"; "Option"] in
518519
let stringModulePath = ["Js"; "String2"] in
519520
let getModulePath path =
@@ -525,6 +526,7 @@ let processCompletable ~findItems ~full ~package ~pos ~rawOpens
525526
in
526527
match path with
527528
| Path.Pident id when Ident.name id = "array" -> arrayModulePath
529+
| Path.Pident id when Ident.name id = "list" -> listModulePath
528530
| Path.Pident id when Ident.name id = "option" -> optionModulePath
529531
| Path.Pident id when Ident.name id = "string" -> stringModulePath
530532
| _ -> ( match loop path with _ :: rest -> List.rev rest | [] -> [])

0 commit comments

Comments
 (0)