feat: complete bracket if the function accepts an only content arg (#848)

* feat: complete bracket if the function will accept an only content argument

* test: update snapshot
This commit is contained in:
Myriad-Dreamin 2024-11-19 11:04:27 +08:00 committed by GitHub
parent ccd3cea08c
commit a1a15a6795
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 315 additions and 47 deletions

View file

@ -243,6 +243,10 @@ impl StatefulRequest for CompletionRequest {
}),
text_edit: Some(text_edit),
insert_text_format: Some(InsertTextFormat::SNIPPET),
commit_characters: typst_completion
.commit_char
.as_ref()
.map(|v| vec![v.to_string()]),
command: typst_completion.command.as_ref().map(|c| Command {
command: c.to_string(),
..Default::default()