Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-service): Implement outlining spans for control flow bl… #52062

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Oct 5, 2023

…ocks

This commit implements the getOutlingSpans to retrieve Angular-specific outlining spans. At the moment, these spans are limited to control-flow blocks in templates.

This is required for folding ranges (angular/vscode-ng-language-service#1930)

…ocks

This commit implements the getOutlingSpans to retrieve Angular-specific
outlining spans. At the moment, these spans are limited to control-flow
blocks in templates.

This is required for folding ranges (angular/vscode-ng-language-service#1930)
@atscott atscott added area: language-service Issues related to Angular's VS Code language service target: minor This PR is targeted for the next minor release labels Oct 5, 2023
@ngbot ngbot bot modified the milestone: Backlog Oct 5, 2023
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Oct 5, 2023
@atscott atscott requested a review from crisbeto October 6, 2023 15:59
@atscott atscott marked this pull request as ready for review October 6, 2023 15:59
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM


class BlockVisitor extends t.RecursiveVisitor {
readonly blocks = [] as
Array<t.IfBlockBranch|t.ForLoopBlockEmpty|t.ForLoopBlock|t.SwitchBlockCase|t.SwitchBlock|
Copy link
Member

Choose a reason for hiding this comment

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

nit: should we have a type that includes all the blocks so we don't need to repeat this?

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Oct 9, 2023
@atscott
Copy link
Contributor Author

atscott commented Oct 9, 2023

This PR was merged into the repository by commit 023a181.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 9, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
…ocks (angular#52062)

This commit implements the getOutlingSpans to retrieve Angular-specific
outlining spans. At the moment, these spans are limited to control-flow
blocks in templates.

This is required for folding ranges (angular/vscode-ng-language-service#1930)

PR Close angular#52062
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: language-service Issues related to Angular's VS Code language service detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants