Closed imaksp closed 11 months ago
This particular issue will be fixed by https://github.com/angular/vscode-ng-language-service/pull/1952
As for syntax highlighting applying to non-Angular templates, unfortunately there is no way to dynamically enable or disable syntax highlighting in VSCode. https://github.com/microsoft/vscode/issues/68647
Ok, will it be possible to add config based on file extension, like Angular syntax highlighting only gets applied if file ends with component.html
OR ng.html
?
Ok, will it be possible to add config based on file extension, like Angular syntax highlighting only gets applied if file ends with component.html OR ng.html?
There's some nuance to this, but the short answer is no. Again, there's no option in VSCode to configure grammars dynamically and that includes grammars based on a config file. There are ways to configure the VSCode extension in a way that only provides the grammar for those file extensions across the board, but then they would never be included for files without that extension. Because Angular doesn't require a particular extension for the template files, this isn't ideal.
Closing as resolved by #1952 which was included in the release today.
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.
🐞 bug report
Is this a regression?
Yes
Description
If non angular html file or angular index html file has style tag with @import url statement it breaks syntax highlighting of rest of the file.
Bug Type
What does this bug affect
Reproduction
Steps to reproduce the behavior:
Expected behavior
It should not break normal html syntax highlighting.
Screenshots
🌍 Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System: