Allow multiple snippet edits in a TextDocumentEdit

This commit is contained in:
DropDemBits 2023-11-11 22:10:21 -05:00
parent 3b7c7f97e4
commit 1e4686865e
No known key found for this signature in database
GPG Key ID: 7FE02A6C1EDFA075

View File

@ -57,8 +57,9 @@ export interface TextDocumentEdit {
} }
``` ```
When applying such code action or text edit, the editor should insert snippet, with tab stops and placeholder. When applying such code action or text edit, the editor should insert snippet, with tab stops and placeholders.
At the moment, rust-analyzer guarantees that only a single edit will have `InsertTextFormat.Snippet`. At the moment, rust-analyzer guarantees that only a single `TextDocumentEdit` will have edits which can be `InsertTextFormat.Snippet`.
Any additional `TextDocumentEdit`s will only have edits which are `InsertTextFormat.PlainText`.
### Example ### Example