@@ -510,8 +510,9 @@ let getComplementaryCompletionsForTypedValue ~opens ~allFiles ~scope ~env prefix
510510 in
511511 localCompletionsWithOpens @ fileModules
512512
513- let getCompletionsForPath ~package ~opens ~allFiles ~pos ~exact ~scope
513+ let getCompletionsForPath ~debug ~ package ~opens ~allFiles ~pos ~exact ~scope
514514 ~completionContext ~env path =
515+ if debug then Printf. printf " Path %s\n " (path |> String. concat " ." );
515516 match path with
516517 | [] -> []
517518 | [prefix] ->
@@ -737,7 +738,7 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~allFiles ~pos
737738 ])
738739 | CPId (path , completionContext ) ->
739740 path
740- |> getCompletionsForPath ~package ~opens ~all Files ~pos ~exact
741+ |> getCompletionsForPath ~debug ~ package ~opens ~all Files ~pos ~exact
741742 ~completion Context ~env ~scope
742743 | CPApply (cp , labels ) -> (
743744 match
@@ -784,7 +785,7 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~allFiles ~pos
784785 | CPField (CPId (path , Module), fieldName ) ->
785786 (* M.field *)
786787 path @ [fieldName]
787- |> getCompletionsForPath ~package ~opens ~all Files ~pos ~exact
788+ |> getCompletionsForPath ~debug ~ package ~opens ~all Files ~pos ~exact
788789 ~completion Context:Field ~env ~scope
789790 | CPField (cp , fieldName ) -> (
790791 let completionsForCtxPath =
@@ -952,7 +953,7 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~allFiles ~pos
952953 in
953954 let completions =
954955 completionPath @ [funNamePrefix]
955- |> getCompletionsForPath ~completion Context:Value ~exact: false
956+ |> getCompletionsForPath ~debug ~ completion Context:Value ~exact: false
956957 ~package ~opens ~all Files ~pos ~env ~scope
957958 in
958959 let completions =
@@ -1016,8 +1017,8 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~allFiles ~pos
10161017 | CJsxPropValue {pathToComponent; propName} -> (
10171018 let findTypeOfValue path =
10181019 path
1019- |> getCompletionsForPath ~completion Context:Value ~exact: true ~package
1020- ~opens ~all Files ~pos ~env ~scope
1020+ |> getCompletionsForPath ~debug ~ completion Context:Value ~exact: true
1021+ ~package ~ opens ~all Files ~pos ~env ~scope
10211022 |> completionsGetTypeEnv2 ~debug ~full ~opens ~raw Opens ~all Files ~pos
10221023 ~scope
10231024 in
@@ -1031,7 +1032,7 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~allFiles ~pos
10311032 let rec digToTypeForCompletion path =
10321033 match
10331034 path
1034- |> getCompletionsForPath ~completion Context:Type ~exact: true
1035+ |> getCompletionsForPath ~debug ~ completion Context:Type ~exact: true
10351036 ~package ~opens ~all Files ~pos ~env ~scope
10361037 with
10371038 | {kind = Type {kind = Abstract (Some (p , _ ))} } :: _ ->
@@ -1412,8 +1413,8 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
14121413 let allFiles = FileSet. union package.projectFiles package.dependenciesFiles in
14131414 let findTypeOfValue path =
14141415 path
1415- |> getCompletionsForPath ~completion Context:Value ~exact: true ~package
1416- ~opens ~all Files ~pos ~env ~scope
1416+ |> getCompletionsForPath ~debug ~ completion Context:Value ~exact: true
1417+ ~package ~ opens ~all Files ~pos ~env ~scope
14171418 |> completionsGetTypeEnv2 ~debug ~full ~opens ~raw Opens ~all Files ~pos
14181419 ~scope
14191420 in
0 commit comments