diff --git a/CHANGELOG.md b/CHANGELOG.md index 2840e47b5..46181e0ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,6 @@ ## master -## v1.10.0 - #### :rocket: New Feature - Add autocomplete for function argument values (booleans, variants and options. More values coming), both labelled and unlabelled. https://github.com/rescript-lang/rescript-vscode/pull/665 @@ -23,6 +21,12 @@ #### :nail_care: Polish +- Prefer opened `Belt` modules in autocomplete when `-open Belt` is detected in `bsconfig`. https://github.com/rescript-lang/rescript-vscode/pull/673 + +## v1.10.0 + +#### :nail_care: Polish + - Remove spacing between type definition in clients that do not support markdown links. https://github.com/rescript-lang/rescript-vscode/pull/619 - Rename custom LSP methods names. https://github.com/rescript-lang/rescript-vscode/pull/611 - Better performance for Inlay Hints and Codelens. https://github.com/rescript-lang/rescript-vscode/pull/634 diff --git a/analysis/src/Packages.ml b/analysis/src/Packages.ml index 7e2ca25e0..3c90d7b52 100644 --- a/analysis/src/Packages.ml +++ b/analysis/src/Packages.ml @@ -112,6 +112,24 @@ let newBsPackage ~rootPath = listModulePath = ["List"]; resultModulePath = ["Result"]; } + else if + opens_from_bsc_flags + |> List.find_opt (fun opn -> + match opn with + | ["Belt"] -> true + | _ -> false) + |> Option.is_some + then + { + arrayModulePath = ["Array"]; + optionModulePath = ["Option"]; + stringModulePath = ["Js"; "String2"]; + intModulePath = ["Int"]; + floatModulePath = ["Float"]; + promiseModulePath = ["Js"; "Promise"]; + listModulePath = ["List"]; + resultModulePath = ["Result"]; + } else { arrayModulePath = ["Js"; "Array2"];