@@ -594,7 +594,8 @@ let getComplementaryCompletionsForTypedValue ~opens ~allFiles ~scope ~env prefix
594
594
(Utils. fileNameHasUnallowedChars name)
595
595
then
596
596
Some
597
- (Completion. create name ~env ~kind: (Completion. FileModule name))
597
+ (Completion. create name ~synthetic: true ~env
598
+ ~kind: (Completion. FileModule name))
598
599
else None )
599
600
in
600
601
localCompletionsWithOpens @ fileModules
@@ -863,7 +864,7 @@ and getCompletionsForContextPath ~debug ~full ~opens ~rawOpens ~pos ~env ~exact
863
864
| CPArray None ->
864
865
if Debug. verbose () then print_endline " [ctx_path]--> CPArray (no payload)" ;
865
866
[
866
- Completion. create " array " ~env
867
+ Completion. create " dummy " ~env
867
868
~kind: (Completion. Value (Ctype. newconstr Predef. path_array [] ));
868
869
]
869
870
| CPArray (Some cp ) -> (
@@ -2229,8 +2230,8 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
2229
2230
| Cdecorator prefix ->
2230
2231
let mkDecorator (name , docstring , maybeInsertText ) =
2231
2232
{
2232
- (Completion. create name ~includes Snippets :true ~kind: ( Label " " ) ~env
2233
- ?insertText:maybeInsertText)
2233
+ (Completion. create name ~synthetic : true ~includes Snippets: true
2234
+ ~kind: ( Label " " ) ~env ?insertText:maybeInsertText)
2234
2235
with
2235
2236
docstring;
2236
2237
}
@@ -2494,8 +2495,9 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
2494
2495
if Utils. startsWith elementName prefix then
2495
2496
let name = " <" ^ elementName ^ " >" in
2496
2497
Some
2497
- (Completion. create name ~kind: (Label name) ~detail: description
2498
- ~env ~docstring: [description] ~insert Text:elementName
2498
+ (Completion. create name ~synthetic: true ~kind: (Label name)
2499
+ ~detail: description ~env ~docstring: [description]
2500
+ ~insert Text:elementName
2499
2501
?deprecated:
2500
2502
(match deprecated with
2501
2503
| true -> Some " true"
@@ -2508,10 +2510,10 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
2508
2510
implemented."
2509
2511
in
2510
2512
[
2511
- Completion. create " todo" ~kind: (Label " todo" ) ~detail ~env
2512
- ~insert Text:" todo" ;
2513
- Completion. create " todo (with payload)" ~includes Snippets :true
2514
- ~kind: (Label " todo" )
2513
+ Completion. create " todo" ~synthetic: true ~ kind: (Label " todo" ) ~detail
2514
+ ~env ~ insert Text:" todo" ;
2515
+ Completion. create " todo (with payload)" ~synthetic : true
2516
+ ~includes Snippets: true ~ kind: (Label " todo" )
2515
2517
~detail: (detail ^ " With a payload." )
2516
2518
~env ~insert Text:" todo(\" ${0:TODO}\" )" ;
2517
2519
]
0 commit comments