Skip to content

Commit

Permalink
Allow multiple snippet edits in a TextDocumentEdit
Browse files Browse the repository at this point in the history
  • Loading branch information
DropDemBits committed Nov 12, 2023
1 parent 3b7c7f9 commit 1e46868
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/dev/lsp-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
At the moment, rust-analyzer guarantees that only a single edit will have `InsertTextFormat.Snippet`.
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 `TextDocumentEdit` will have edits which can be `InsertTextFormat.Snippet`.
Any additional `TextDocumentEdit`s will only have edits which are `InsertTextFormat.PlainText`.

### Example

Expand Down

0 comments on commit 1e46868

Please sign in to comment.