Skip to content

Add a workaround for SnippetTextEdit.keepWhitespace not being available in LSP #6120

Closed

Description

@DanTup

We switched from non-standard snippet text edits to the new LSP v3.18 SnippetTextEdits, but it turns out LSP doesn't have a keepWhitespace field (which VS Code does), and so the whitespace is getting messed up.

I've opened microsoft/language-server-protocol#2290 to determine what the correct fix is, but in the meantime we should see if we can override this client-side in Dart-Code for now to avoid indentation for all code actions potentially being messed up.

The original bug report with steps to repro is at dart-lang/sdk#63790

Activity

  1. added this to the v3.140.0 milestone on Jul 15, 2026
  2. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    in editorRelates to code editing or language features
    on Jul 15, 2026
  3. self-assigned this
    on Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in editorRelates to code editing or language featuresis enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions