question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Syntax highlighting of arrow => after upgrade to VS Code 1.70

See original GitHub issue

After 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:

2022-08-05_000235

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
jb-qiancommented, Aug 5, 2022

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

1reaction
bcurtin144commented, Aug 5, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found