@@ -352,9 +352,7 @@ let findAllCompletions ~(env : QueryEnv.t) ~prefix ~exact ~namesUsed
352352
353353let processLocalValue name loc contextPath scope ~prefix ~exact ~env
354354 ~(localTables : LocalTables.t ) =
355- if Utils. checkName name ~prefix ~exact then (
356- print_endline
357- (" processLocalValue name: " ^ name ^ " loc: " ^ Loc. toString loc);
355+ if Utils. checkName name ~prefix ~exact then
358356 match Hashtbl. find_opt localTables.valueTable (name, Loc. start loc) with
359357 | Some declared ->
360358 if not (Hashtbl. mem localTables.namesUsed name) then (
@@ -381,7 +379,7 @@ let processLocalValue name loc contextPath scope ~prefix ~exact ~env
381379 (Ctype. newconstr
382380 (Path. Pident (Ident. create " Type Not Known" ))
383381 [] ))
384- :: localTables.resultRev)
382+ :: localTables.resultRev
385383
386384let processLocalConstructor name loc ~prefix ~exact ~env
387385 ~(localTables : LocalTables.t ) =
@@ -564,13 +562,12 @@ let findLocalCompletionsForModules ~(localTables : LocalTables.t) ~env ~prefix
564562let findLocalCompletionsWithOpens ~pos ~(env : QueryEnv.t ) ~prefix ~exact ~opens
565563 ~scope ~(completionContext : Completable.completionContext ) =
566564 (* TODO: handle arbitrary interleaving of opens and local bindings correctly *)
567- print_endline
565+ Log. log
568566 (" findLocalCompletionsWithOpens uri:" ^ Uri. toString env.file.uri ^ " pos:"
569567 ^ Pos. toString pos);
570568 let localTables = LocalTables. create () in
571569 match completionContext with
572570 | Value | ValueOrField ->
573- print_endline " Value or Field" ;
574571 findLocalCompletionsForValuesAndConstructors ~local Tables ~env ~prefix
575572 ~exact ~opens ~scope
576573 | Type ->
@@ -616,16 +613,6 @@ let getCompletionsForPath ~debug ~opens ~full ~pos ~exact ~scope
616613 findLocalCompletionsWithOpens ~pos ~env ~prefix ~exact ~opens ~scope
617614 ~completion Context
618615 in
619- print_endline
620- (" localCompletionsWithOpens: "
621- ^ (List. map
622- (fun c ->
623- match c.Completion. sortText with
624- | None -> c.Completion. name
625- | Some insertText -> c.Completion. name ^ " " ^ insertText)
626- localCompletionsWithOpens
627- |> String. concat " ," ));
628-
629616 let fileModules =
630617 allFiles |> FileSet. elements
631618 |> Utils. filterMap (fun name ->
@@ -789,7 +776,7 @@ let completionsGetCompletionType ~full completions =
789776 | _ -> None
790777
791778(* *
792- Returns completions from the current module where `include OtherModule` is present.
779+ Returns completions from the current module where `include OtherModule() ` is present.
793780*)
794781let completionsFromIncludedModule ~full ~env ~pos =
795782 (* Get the path of the module where the cursor is.*)
@@ -808,10 +795,8 @@ let completionsFromIncludedModule ~full ~env ~pos =
808795 let ownerPath =
809796 ModulePath. toPathWithPrefix ownerPath full.file.File. moduleName
810797 in
811- Format. printf " ownerPath: %s \n " (ownerPath |> String. concat " ." );
812- if ownerPath = ownModule then (
813- print_endline " hit" ;
814- Some (Completion. create name.txt ~env ~kind: (Value item)))
798+ if ownerPath = ownModule then
799+ Some (Completion. create name.txt ~env ~kind: (Value item))
815800 else None
816801 | _ -> None )
817802
0 commit comments