diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc63eb3e..79db7d685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ #### :bug: Bug Fix - Fix issue `open` on submodules exposed via `-open` in bsconfig.json/rescript.json, that would cause the content of those `open` modules to not actually appear in autocomplete. https://github.com/rescript-lang/rescript-vscode/pull/842 +- Account for namespace when filtering pipe completion items. https://github.com/rescript-lang/rescript-vscode/pull/843 ## 1.22.0 diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index 040ff5843..e26048a4b 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -943,6 +943,10 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~pos ~env ~exact | [_], _ -> Some modulePath | s :: inner, first :: restPath when s = first -> removeRawOpen inner restPath + | s :: inner, first :: restPath + when String.contains first '-' && Utils.startsWith first s -> + (* This handles namespaced modules, which have their namespace appended after a '-' *) + removeRawOpen inner restPath | _ -> None in let rec removeRawOpens rawOpens modulePath =