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

Syntax highlighting of < and > inside <script> #1677

Closed
2-5 opened this issue Aug 6, 2022 · 6 comments
Closed

Syntax highlighting of < and > inside <script> #1677

2-5 opened this issue Aug 6, 2022 · 6 comments
Labels

Comments

@2-5
Copy link
Contributor

2-5 commented Aug 6, 2022

#1675 not fully solved by 0.39.5, created new issue since I can't reopen that:

2022-08-06_144452

@hikariyo
Copy link

hikariyo commented Aug 6, 2022

I'm in the same situation as you.
image

@hikariyo
Copy link

hikariyo commented Aug 6, 2022

It seems that the problem is caused by Bracket Pair Colorization, which can be turned off in VSCode's Settings.

@johnsoncodehk
Copy link
Member

Please track microsoft/vscode#157241.

@hediet
Copy link

hediet commented Aug 8, 2022

@johnsoncodehk

I know it is suboptimal, but this bug can be fixed short-term by adding this to the vue grammar contribution:

"unbalancedBracketScopes": [
    "keyword.operator.relational",
    "storage.type.function.arrow",
    "keyword.operator.bitwise.shift",
    "meta.brace.angle",
    "punctuation.definition.tag"
]

Unfortunately, there is a bug in our textmate grammar implementation that only considers unbalancedBracketScopes of the root grammar and not of injected grammars.

@Nercus
Copy link

Nercus commented Aug 8, 2022

Adding the following to settings.json does help temporarily (at least that fixed it for me 😃):

"editor.language.colorizedBracketPairs": [
    [
        "{",
        "}"
    ],
    [
        "[",
        "]"
    ],
    [
        "(",
        ")"
    ]
]

@hedwiggggg
Copy link

Got wrong bracket matching in addition to wrong colorization when using JSX/TSX inside of a .vue file. Workaround was downgrading vs-code to version 1.69.

https://code.visualstudio.com/updates/v1_69

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants