microsoft / microsoft/language-server-protocol
SnippetTextEdit doesn't have an option for preserving whitespace
Open
@dbaeumer is already working on this.
Since Jul 15, 2026.
- Dominant language
- TypeScript
- Stars
- 13k
- Forks
- 1k
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 10
Description
VS Code's SnippetTextEdit has a keepWhitespace: boolean, which is not present in LSP.
After migrating some server code to use SnippetTextEdits, we found that VS Code is messing up the whitespace (trying to compensate for the lines indentation, even though the server had already done it correctly, resulting in duplicated indentation).
@dbaeumer should keepWhitespace be an option here, or should the VS Code LSP client just always set it to true?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.