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

Invalid TypeScript syntax highlighting after line break #22951

Closed
Deilan opened this issue Mar 21, 2017 · 3 comments
Closed

Invalid TypeScript syntax highlighting after line break #22951

Deilan opened this issue Mar 21, 2017 · 3 comments
Assignees
Labels
javascript JavaScript support issues languages-basic Basic language support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@Deilan
Copy link

Deilan commented Mar 21, 2017

  • VSCode Version: 1.10.2
  • OS Version: Windows 10 x64

image

@mjbvz mjbvz added info-needed Issue requires more information from poster languages-basic Basic language support issues javascript JavaScript support issues typescript Typescript support issues labels Mar 21, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 21, 2017

@Deilan Please share your actual code along with the screenshot. Also, does this repo if you disable all extensions by starting code with the --disable-extensions flag?

@Deilan
Copy link
Author

Deilan commented Mar 22, 2017

Here's a simple TypeScript file for repro (note that the conditional expression could be very long - that's how I stumbled upon the issue at first):

export class SomeClass {
    private someMethod(): void {
        if (1
            < 2) {
            console.log("TypeScript syntax highlighting is broken!");
        }
        else if (1 > 2) {
            console.log("");
        }
    }

    private someOtherMethod() {
        console.log("");
        //
        const q = 1;
        var s = 2;
        let e = 3;
    }

    q = 100;
}

capture

@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed info-needed Issue requires more information from poster labels Mar 22, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 22, 2017

Thanks @Deilan! I've opened microsoft/TypeScript-TmLanguage#434 to track this in the TypeScript grammar

As a workaround, try using the TypeScript react grammar instead, either by changing the language mode manually or adding:

"files.associations": { "*.ts": "typescriptreact" }

to your workspace or user settings

@mjbvz mjbvz closed this as completed Mar 22, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues languages-basic Basic language support issues typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants