Syntax highlighting of arrow => after upgrade to VS Code 1.70
See original GitHub issueAfter today’s upgrade of VS Code to 1.70 the syntax highlighting of =>
in .vue
files changed. Also notice the <
and >
in tags.
Compare .vue
with .ts
file:
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
July 2022 (version 1.70) - Visual Studio Code
Learn what is new in the Visual Studio Code July 2022 Release (1.70)
Read more >Right caret color becoming red incorrectly #157322 - GitHub
In Typescript, using the Default Dark+ theme, the right caret is being colored red in comparisons (greater than, greater than or equals), and...
Read more >10 Must-have VS Code Extensions for JavaScript Developers
With over 550k+ installs to date, this extension provides syntax highlighting for ES201x JavaScript, React, FlowType and GraphQL code.
Read more >25 VS Code Productivity Tips and Speed Hacks - YouTube
Learn 25 VS Code tips and tricks that will help you write code faster. Try out awesome new features and extensions that turn...
Read more >Set language for syntax highlighting in Visual Studio Code
If you are seeing the Extensions panel, you may be pressing Ctrl + K, Ctrl + M instead of Ctrl + K, M,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
open
/Users/${username}/.vscode/extensions/vue.volar-0.39.4-darwin-x64/syntaxes/vue.tmLanguage.json
change
"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)ts\\b\\2)",
to"begin": "([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)\\ts\\b\\2)",
or"begin": #"([a-zA-Z0-9:-]+)\\b(?=[^>]*\\blang\\s*=\\s*(['\"]?)ts\\b)\\2",
reload vscode(v1.70.0)
it seems that it can be solved temporarily
I think the problem is that the TextMate regular expression rules mark the
<script lang="ts">
tag itself as TypeScript, at which point VS Code tries to apply bracket pair colorization and gets tripped up on the>
, which continues on to other angle bracket symbols, like=>
.I’m definitely not an expert at TextMate, but it would seem that the solution would be to apply TypeScript rules only to what’s between the
<script lang="ts">...</script>
tags, and not the tags themselves.