[Repo Assist] fix: add //#region folding markers to language configuration#2151
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Draft
Conversation
VS Code 1.76+ evaluates folding.markers from the language configuration alongside the LSP folding range provider. Declaring region markers here allows //#region and //#endregion to create collapsible sections in F# files even when Ionide is active. Previously these markers only worked for standalone .fs files, but were ignored when FSAC's FoldingRangeProvider was active. Closes #2125 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 tasks
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.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Closes #2125
Adds
//#regionand//#endregionfolding markers torelease/language-configuration.json, enabling region-based code folding in F# files when Ionide is active.Problem
VS Code's built-in folding correctly folds
//#regionblocks in standalone.fsfiles (where it uses its own token-based provider). However, once Ionide is active, FSAC'sFoldingRangeProvidertakes over and the built-in region markers stop working — there's no fold indicator in the gutter for//#regionblocks.Fix
Add the
folding.markerssection torelease/language-configuration.json:As of VS Code 1.76, the editor evaluates
folding.markersfrom the language configuration alongside the LSP folding range provider rather than as a pure fallback. This means region markers declared here are honoured even when FSAC provides its own structural folding ranges — users get both structural fold points from FSAC and explicit//#region///#endregionregions.Users on VS Code < 1.76 will not see any regression: the change is purely additive and existing behaviour is unchanged on older versions.
Test Status
This is a JSON configuration file change — no build step required. Validated that the file remains syntactically valid JSON (
python3 -m json.toolpasses cleanly).