Implement access specifier folding range collection and add unit tests - #14675
Open
Prashant Kumar Rai (8prashant) wants to merge 3 commits into
Open
Conversation
Author
|
@microsoft-github-policy-service agree |
Prashant Kumar Rai (8prashant)
marked this pull request as ready for review
August 13, 2026 05:52
Copilot started reviewing on behalf of
Sean McManus (sean-mcmanus)
August 13, 2026 14:04
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds collapsible folding ranges for C++ class access-specifier sections while retaining server-provided ranges.
Changes:
- Implements client-side access-section detection.
- Integrates detected ranges with server results.
- Adds a basic unit test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
foldingRangeUtils.ts |
Detects access-specifier folding ranges. |
foldingRangeProvider.ts |
Appends client-computed ranges. |
foldingRangeProvider.test.ts |
Tests basic access-section folding. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds folding ranges for class access specifier sections (
public:,private:,protected:) so users can collapse each section independently.Related to #14645.
What changed
Why
When classes contain multiple access blocks, collapsing by section helps reduce noise and improves readability, especially in large third-party headers.
Testing
yarn compilemocha dist/test/unit/foldingRangeProvider.test.js --timeout 300001 passing,0 failing