Skip to content

Implement multi-range document formatting - #14776

Merged
Colen Garoutte-Carson (Colengms) merged 2 commits into
mainfrom
dev/coleng/provideDocumentRangesFormattingEdits
Sep 18, 2026
Merged

Colen Garoutte-Carson (Colengms) merged 2 commits into
mainfrom
dev/coleng/provideDocumentRangesFormattingEdits

Conversation

@Colengms

Copy link
Copy Markdown
Contributor

Implements provideDocumentRangesFormattingEdits and sends all requested ranges in one cpptools/formatRange request.

The singular and plural providers now share the same formatting path. The existing range field remains populated for compatibility, while the new optional ranges field carries the complete request.

A companion native change is required.

Validation:

  • yarn build
  • ESLint on the modified TypeScript files

@github-project-automation github-project-automation Bot moved this to Pull Request in cpptools Sep 16, 2026
@Colengms
Colen Garoutte-Carson (Colengms) marked this pull request as ready for review September 17, 2026 02:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The native formatter must consume ranges, or additional requested ranges will be dropped.

Review effort: Lite
Findings: None

What changed in this PR

Adds multi-range document formatting support while preserving single-range compatibility.

Changes:

  • Shares formatting logic between singular and plural providers.
  • Sends all requested ranges through an optional ranges field.
  • Preserves the existing range field.
File Description
Extension/​src/​LanguageServer/​Providers/​documentRangeFormattingEditProvider.ts Adds plural formatting support and serializes multiple ranges.
Extension/​src/​LanguageServer/​client.ts Extends formatting parameters with optional ranges.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Colengms
Colen Garoutte-Carson (Colengms) merged commit 2922033 into main Sep 18, 2026
6 checks passed
@Colengms
Colen Garoutte-Carson (Colengms) deleted the dev/coleng/provideDocumentRangesFormattingEdits branch September 18, 2026 01:39
@github-project-automation github-project-automation Bot moved this from Pull Request to Done in cpptools Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants