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

Entire function is scoped as .token.function.meta.js #208

Closed
Tyriar opened this issue Jul 14, 2016 · 2 comments
Closed

Entire function is scoped as .token.function.meta.js #208

Tyriar opened this issue Jul 14, 2016 · 2 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented Jul 14, 2016

For this function:

// An exceptionally useful comment
function func(param) {
    var text = 'string';
    for (var i = 0; i < param.length; i++) {
        text += i;
    }
    return {
        "text": text,
        "boolean": false
    };
}

The entire function contents is scoped with .token.function.meta.js, meaning if a style exists for this, which it does for several themes, this is what they do:

Microsoft Predawn theme
image

I believe this is the reason some people have pointed out about broken JavaScript text highlighting. Switching to the Atom JavaScript grammar removed the issue as the entire function block is not scoped as such.

/cc @aeschli

@Tyriar
Copy link
Member Author

Tyriar commented Aug 17, 2016

Any movement on this? This is also related to an issue I'm seeing in TS where the parameters are not being scoped correctly when using a converted sublime theme as they have the function scope.

@aeschli
Copy link

aeschli commented Aug 18, 2016

@Tyriar The problem is on our side: microsoft/vscode#3008.

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

No branches or pull requests

3 participants