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

BUG: syntax coloring for new block syntax, not working with Allman formatting #53483

Closed
kukjevov opened this issue Dec 10, 2023 · 3 comments · Fixed by angular/vscode-ng-language-service#2034
Labels
area: language-service Issues related to Angular's VS Code language service bug
Milestone

Comments

@kukjevov
Copy link
Contributor

Which @angular/* package(s) are the source of the bug?

language-service

Is this a regression?

Yes

Description

Following syntax is not colored correctly

@if(cond)
{
}
@else
{
}

also for

@for(x of xxx; track x)
{
}
@empty
{
}

First block is colored that is ok, but second block is always as plain white text.

This is regression, because first version of new block syntax coloring (last beta or first rc, dont remember exactly) was working correctly. This is valid syntax that works, just is not colored correctly.

Since it was working i dont think that there is any reason why it should not work anymore.

Thank you.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

Angular: 17.0.6
Node: 18.17.1
NPM: 9.6.7
Angular Language Service VSCode Extension: 17.0.3

Anything else?

No response

@alxhub alxhub added area: language-service Issues related to Angular's VS Code language service bug labels Dec 11, 2023
@ngbot ngbot bot added this to the needsTriage milestone Dec 11, 2023
@atscott
Copy link
Contributor

atscott commented Dec 19, 2023

Unfortunately this is a trade off we had to make. See the context here: angular/vscode-ng-language-service@075047a

Closing as working as expected.

@atscott atscott closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
@atscott
Copy link
Contributor

atscott commented Dec 19, 2023

Actually I’m going to reopen until we’re sure this is the trade off we want.

Another option here would be to make the syntax highlighting work on the specific block names we support today. This would mean a small bit of extra maintenance burden with needing to keep the syntax highlighting up to date with the block names but it’s quite trivial. It could be a better option, at least for the moment while there’s a limited set of block types with no new ones on the roadmap.

@atscott atscott reopened this Dec 19, 2023
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue May 15, 2024
This updates the syntaxes to only match known block names instead of
requiring a `{` at the end of the line when the block syntax is used.

fixes angular/angular#53483
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue May 15, 2024
This updates the syntaxes to only match known block names instead of
requiring a `{` at the end of the line when the block syntax is used.

fixes angular/angular#53483
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue May 15, 2024
This updates the syntaxes to only match known block names instead of
requiring a `{` at the end of the line when the block syntax is used.

fixes angular/angular#53483
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue May 15, 2024
This updates the syntaxes to only match known block names instead of
requiring a `{` at the end of the line when the block syntax is used.

fixes angular/angular#53483
dylhunn pushed a commit to angular/vscode-ng-language-service that referenced this issue May 17, 2024
This updates the syntaxes to only match known block names instead of
requiring a `{` at the end of the line when the block syntax is used.

fixes angular/angular#53483
@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 Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: language-service Issues related to Angular's VS Code language service bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants