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

Inconsistent TS syntax highlighting #49674

Closed
jpike88 opened this issue May 11, 2018 · 4 comments
Closed

Inconsistent TS syntax highlighting #49674

jpike88 opened this issue May 11, 2018 · 4 comments
Assignees
Labels
*as-designed Described behavior is as designed editor-core Editor basic functionality grammar Syntax highlighting grammar typescript Typescript support issues

Comments

@jpike88
Copy link

jpike88 commented May 11, 2018

  • VSCode Version: 1.23.0
  • OS Version: macOS Sierra

Steps to Reproduce:

  1. Look at attached image. The second mention of FormDialog on that last line is blue... shouldn't it be green as well? Doesn't make sense that the same reference is being highlighted differently on the same line.

screen shot 2018-05-11 at 2 07 49 pm

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added editor editor-core Editor basic functionality labels May 11, 2018
@DJMcNab
Copy link
Contributor

DJMcNab commented May 11, 2018

The first time FormDialog.result is a type, so it is highlighted as a type. The second time it is a variable, so it highlighted as such.

@jpike88
Copy link
Author

jpike88 commented May 11, 2018

Should there be some sort of colour difference that indicates that FormDialog is an import? Is becomes especially handy when it's tucked away deep in the code somewhere, as it's not a local variable.

@DJMcNab
Copy link
Contributor

DJMcNab commented May 11, 2018

I think that thatwould require microsoft/language-server-protocol#18. But it seems like it could be a good idea if that issue is resolved.

@mjbvz
Copy link
Collaborator

mjbvz commented May 11, 2018

This is by design. FormDialog is used as a type in the first location, while in the second it is used as an object. Theme are free to change these colors but our default themes choose to make this distinction clear

@mjbvz mjbvz closed this as completed May 11, 2018
@mjbvz mjbvz added typescript Typescript support issues *as-designed Described behavior is as designed grammar Syntax highlighting grammar labels May 11, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*as-designed Described behavior is as designed editor-core Editor basic functionality grammar Syntax highlighting grammar typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants