From cc85aa512b545dc0df3adc4d9bd80f77b40098f9 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 1 Feb 2023 18:49:02 +0100 Subject: [PATCH 1/2] fall back to regular local completions when typed expression completion misses --- analysis/src/CompletionBackEnd.ml | 17 +- analysis/tests/src/CompletionExpressions.res | 9 + .../expected/CompletionExpressions.res.txt | 1260 ++++++++++++++++- 3 files changed, 1276 insertions(+), 10 deletions(-) diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index d9f9c04fa..cf911a08f 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -1410,17 +1410,22 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover fallbackOrEmpty ~items ()) | None -> fallbackOrEmpty ()) | Cexpression {contextPath; prefix; nested} -> ( + (* Completions for local things like variables in scope, modules in the project, etc. *) + let regularCompletions = + prefix + |> getComplementaryCompletionsForTypedValue ~opens ~allFiles ~env ~scope + in match contextPath |> getCompletionsForContextPath ~full ~opens ~rawOpens ~allFiles ~pos ~env ~exact:true ~scope |> completionsGetCompletionType ~full with - | None -> [] + | None -> regularCompletions | Some (typ, env) -> ( match typ |> TypeUtils.resolveNested ~env ~full ~nested with - | None -> [] - | Some (typ, env, completionContext) -> ( + | None -> regularCompletions + | Some (typ, _env, completionContext) -> ( (* Wrap the insert text in braces when we're completing the root of a JSX prop value. *) let wrapInsertTextInBraces = @@ -1448,12 +1453,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover match (prefix, completionContext) with | "", _ -> items | _, None -> - (* Completions for local things like variables in scope, modules in the project, etc. *) - let regularCompletions = - prefix - |> getComplementaryCompletionsForTypedValue ~opens ~allFiles ~env - ~scope - in let items = if List.length regularCompletions > 0 then (* The client will occasionally sort the list of completions alphabetically, disregarding the order diff --git a/analysis/tests/src/CompletionExpressions.res b/analysis/tests/src/CompletionExpressions.res index 605813e1d..2bd5390cd 100644 --- a/analysis/tests/src/CompletionExpressions.res +++ b/analysis/tests/src/CompletionExpressions.res @@ -177,3 +177,12 @@ let fnTakingCallback = ( // fnTakingCallback(a, b, c, d, e, ) // ^com + +let something = { + let second = true + let second2 = 1 + ignore(second) + ignore(second2) + Js.log(s) + // ^com +} diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index ae108ccd3..8d5007423 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -181,7 +181,1231 @@ Complete src/CompletionExpressions.res 44:46 posCursor:[44:46] posNoWhite:[44:45] Found expr:[44:11->44:49] Pexp_apply ...[44:11->44:25] (...[44:26->44:48]) Completable: Cexpression CArgument Value[fnTakingRecord]($0)->recordField(nested), recordBody -[] +[{ + "label": "fnTakingRecord", + "kind": 12, + "tags": [], + "detail": "someRecord => unit", + "documentation": null + }, { + "label": "f", + "kind": 12, + "tags": [], + "detail": "option>", + "documentation": null + }, { + "label": "s", + "kind": 12, + "tags": [], + "detail": "bool", + "documentation": null + }, { + "label": "Arg", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Array", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ArrayLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Auto", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Array", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Float", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashMap", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashMapInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashMapString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashSet", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashSetInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_HashSetString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Id", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Int", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_List", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Map", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MapDict", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MapInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MapString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableMap", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableMapInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableMapString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableQueue", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableSet", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableSetInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableSetString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_MutableStack", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Option", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Range", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Result", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_Set", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SetDict", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SetInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SetString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SortArray", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SortArrayInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_SortArrayString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalAVLset", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalAVLtree", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalBuckets", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalBucketsType", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalMapInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalMapString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalSetBuckets", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalSetInt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internalSetString", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Belt_internals", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "BrokenParserCases", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Buffer", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Bytes", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "BytesLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Callback", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CamlinternalLazy", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CamlinternalMod", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Char", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CodeLens", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletePrioritize1", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletePrioritize2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Completion", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionExpressions", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionFunctionArguments", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionJsx", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionJsxProps", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionPattern", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionPipeChain", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionPipeSubmodules", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionSupport", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CompletionTypeAnnotation", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Complex", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Component", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ComponentInner", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "CreateInterface", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Cross", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Dce", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "DceTest", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Debug", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Definition", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "DefinitionWithInterface", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Destructuring", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Digest", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Div", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "DocComments", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "DocumentSymbol", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Dom", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Dom_storage", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Dom_storage2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ExhaustiveSwitch", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Filename", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Fragment", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Genlex", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Hashtbl", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "HashtblLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Highlight", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Hover", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "InlayHint", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Int32", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Int64", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_OO", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_array", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_array2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_bigint", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_cast", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_console", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_date", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_dict", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_exn", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_float", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_global", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_int", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_json", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_list", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_map", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_mapperRt", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_math", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_null", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_null_undefined", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_obj", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_option", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_promise", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_promise2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_re", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_result", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_set", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_string", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_string2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_typed_array", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_typed_array2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_types", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_undefined", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_vector", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_weakmap", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Js_weakset", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Jsx", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Jsx2", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "JsxDOM", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "JsxDOMStyle", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "JsxEvent", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "JsxPPXReactSupport", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "JsxV4", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Lazy", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Lexing", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "List", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ListLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "LongIdentTest", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Map", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "MapLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "MoreLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_buffer", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_child_process", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_fs", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_module", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_path", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Node_process", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Obj", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Object", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Parsing", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Patterns", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Pervasives", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Printexc", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Queue", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Random", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "React", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOM", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOMRe", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOMServer", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOMStyle", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOMStyle_V3", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactDOM_V3", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactEvent", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactEvent_V3", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactTestUtils", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReactV3", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "React_V3", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReasonReact", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RecModules", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RecordCompletion", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RecoveryOnProp", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "References", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReferencesInner", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "ReferencesWithInterface", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Rename", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RenameWithInterface", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RescriptReactErrorBoundary", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "RescriptReactRouter", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Set", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "SetLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "SignatureHelp", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Sort", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Stack", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "StdLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Stream", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "String", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "StringLabels", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Sys", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "TableclothMap", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "TypeDefinition", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Uchar", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }, { + "label": "Xform", + "kind": 9, + "tags": [], + "detail": "file module", + "documentation": null + }] Complete src/CompletionExpressions.res 47:51 posCursor:[47:51] posNoWhite:[47:50] Found expr:[47:11->47:55] @@ -713,3 +1937,37 @@ Completable: Cexpression CArgument Value[fnTakingCallback]($5) "insertTextFormat": 2 }] +Complete src/CompletionExpressions.res 185:10 +posCursor:[185:10] posNoWhite:[185:9] Found expr:[181:2->185:11] +posCursor:[185:10] posNoWhite:[185:9] Found expr:[182:2->185:11] +posCursor:[185:10] posNoWhite:[185:9] Found expr:[183:2->185:11] +posCursor:[185:10] posNoWhite:[185:9] Found expr:[184:2->185:11] +posCursor:[185:10] posNoWhite:[185:9] Found expr:[185:2->185:11] +Pexp_apply ...[185:2->185:8] (...[185:9->185:10]) +Completable: Cexpression CArgument Value[Js, log]($0)=s +[{ + "label": "second2", + "kind": 12, + "tags": [], + "detail": "int", + "documentation": null + }, { + "label": "second", + "kind": 12, + "tags": [], + "detail": "bool", + "documentation": null + }, { + "label": "someBoolVar", + "kind": 12, + "tags": [], + "detail": "bool", + "documentation": null + }, { + "label": "s", + "kind": 12, + "tags": [], + "detail": "bool", + "documentation": null + }] + From e151fe811f3419a24d7789504117b2ad79d85165 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 1 Feb 2023 18:54:49 +0100 Subject: [PATCH 2/2] only add regular completions when there is a prefix to filter the results on --- analysis/src/CompletionBackEnd.ml | 15 +- .../expected/CompletionExpressions.res.txt | 1226 +---------------- 2 files changed, 11 insertions(+), 1230 deletions(-) diff --git a/analysis/src/CompletionBackEnd.ml b/analysis/src/CompletionBackEnd.ml index cf911a08f..dada1028a 100644 --- a/analysis/src/CompletionBackEnd.ml +++ b/analysis/src/CompletionBackEnd.ml @@ -1410,10 +1410,15 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover fallbackOrEmpty ~items ()) | None -> fallbackOrEmpty ()) | Cexpression {contextPath; prefix; nested} -> ( - (* Completions for local things like variables in scope, modules in the project, etc. *) + (* Completions for local things like variables in scope, modules in the + project, etc. We only add completions when there's a prefix of some sort + we can filter on, since we know we're in some sort of context, and + therefore don't want to overwhelm the user with completion items. *) let regularCompletions = - prefix - |> getComplementaryCompletionsForTypedValue ~opens ~allFiles ~env ~scope + if prefix = "" then [] + else + prefix + |> getComplementaryCompletionsForTypedValue ~opens ~allFiles ~env ~scope in match contextPath @@ -1537,8 +1542,8 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover if Utils.startsWith elementName prefix then let name = "<" ^ elementName ^ ">" in Some - (Completion.create name ~kind:(Label name) ~detail:description ~env - ~docstring:[description] ~insertText:elementName + (Completion.create name ~kind:(Label name) ~detail:description + ~env ~docstring:[description] ~insertText:elementName ?deprecated: (match deprecated with | true -> Some "true" diff --git a/analysis/tests/src/expected/CompletionExpressions.res.txt b/analysis/tests/src/expected/CompletionExpressions.res.txt index 8d5007423..d6217d792 100644 --- a/analysis/tests/src/expected/CompletionExpressions.res.txt +++ b/analysis/tests/src/expected/CompletionExpressions.res.txt @@ -181,1231 +181,7 @@ Complete src/CompletionExpressions.res 44:46 posCursor:[44:46] posNoWhite:[44:45] Found expr:[44:11->44:49] Pexp_apply ...[44:11->44:25] (...[44:26->44:48]) Completable: Cexpression CArgument Value[fnTakingRecord]($0)->recordField(nested), recordBody -[{ - "label": "fnTakingRecord", - "kind": 12, - "tags": [], - "detail": "someRecord => unit", - "documentation": null - }, { - "label": "f", - "kind": 12, - "tags": [], - "detail": "option>", - "documentation": null - }, { - "label": "s", - "kind": 12, - "tags": [], - "detail": "bool", - "documentation": null - }, { - "label": "Arg", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Array", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ArrayLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Auto", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Array", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Float", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashMap", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashMapInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashMapString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashSet", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashSetInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_HashSetString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Id", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Int", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_List", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Map", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MapDict", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MapInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MapString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableMap", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableMapInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableMapString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableQueue", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableSet", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableSetInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableSetString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_MutableStack", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Option", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Range", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Result", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_Set", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SetDict", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SetInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SetString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SortArray", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SortArrayInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_SortArrayString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalAVLset", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalAVLtree", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalBuckets", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalBucketsType", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalMapInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalMapString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalSetBuckets", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalSetInt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internalSetString", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Belt_internals", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "BrokenParserCases", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Buffer", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Bytes", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "BytesLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Callback", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CamlinternalLazy", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CamlinternalMod", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Char", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CodeLens", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletePrioritize1", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletePrioritize2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Completion", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionExpressions", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionFunctionArguments", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionJsx", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionJsxProps", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionPattern", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionPipeChain", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionPipeSubmodules", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionSupport", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CompletionTypeAnnotation", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Complex", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Component", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ComponentInner", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "CreateInterface", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Cross", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Dce", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "DceTest", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Debug", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Definition", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "DefinitionWithInterface", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Destructuring", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Digest", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Div", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "DocComments", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "DocumentSymbol", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Dom", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Dom_storage", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Dom_storage2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ExhaustiveSwitch", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Filename", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Fragment", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Genlex", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Hashtbl", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "HashtblLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Highlight", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Hover", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "InlayHint", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Int32", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Int64", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_OO", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_array", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_array2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_bigint", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_cast", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_console", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_date", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_dict", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_exn", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_float", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_global", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_int", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_json", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_list", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_map", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_mapperRt", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_math", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_null", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_null_undefined", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_obj", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_option", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_promise", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_promise2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_re", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_result", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_set", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_string", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_string2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_typed_array", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_typed_array2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_types", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_undefined", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_vector", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_weakmap", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Js_weakset", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Jsx", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Jsx2", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "JsxDOM", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "JsxDOMStyle", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "JsxEvent", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "JsxPPXReactSupport", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "JsxV4", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Lazy", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Lexing", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "List", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ListLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "LongIdentTest", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Map", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "MapLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "MoreLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_buffer", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_child_process", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_fs", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_module", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_path", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Node_process", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Obj", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Object", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Parsing", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Patterns", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Pervasives", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Printexc", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Queue", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Random", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "React", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOM", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOMRe", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOMServer", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOMStyle", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOMStyle_V3", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactDOM_V3", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactEvent", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactEvent_V3", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactTestUtils", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReactV3", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "React_V3", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReasonReact", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RecModules", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RecordCompletion", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RecoveryOnProp", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "References", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReferencesInner", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "ReferencesWithInterface", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Rename", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RenameWithInterface", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RescriptReactErrorBoundary", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "RescriptReactRouter", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Set", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "SetLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "SignatureHelp", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Sort", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Stack", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "StdLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Stream", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "String", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "StringLabels", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Sys", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "TableclothMap", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "TypeDefinition", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Uchar", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }, { - "label": "Xform", - "kind": 9, - "tags": [], - "detail": "file module", - "documentation": null - }] +[] Complete src/CompletionExpressions.res 47:51 posCursor:[47:51] posNoWhite:[47:50] Found expr:[47:11->47:55]