We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ab9888 commit 0a08c5bCopy full SHA for 0a08c5b
ls/src/features/completion.rs
@@ -483,9 +483,16 @@ fn module_suggestions(
483
})
484
.collect()
485
} else {
486
+ let insert_text = match &ty {
487
+ Type::Array(_) => format!("{name}[${{1}}]${{2}}"),
488
+ _ => format!("{name}"),
489
+ };
490
+
491
vec![CompletionItem {
492
label: name.to_string(),
493
kind: Some(CompletionItemKind::FIELD),
494
+ insert_text: Some(insert_text),
495
+ insert_text_format: Some(InsertTextFormat::SNIPPET),
496
label_details: Some(CompletionItemLabelDetails {
497
description: Some(ty_to_string(&ty)),
498
..Default::default()
0 commit comments