-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
The constant in lower case is defined as a variable #542
Comments
Agreed, though this is not reported often and hence could stay as it is for now. Fixing this means copying multiple pattern rules and modifying just little to accommodate this. If there is enough demand this can be looked at later time. |
Seriously? |
What's going on here ?! How can you ignore the incorrect classification of variables and constants? I am shocked and disappointed! What are the arguments for closing this bug? |
This issue is not being reported many times... Note that in declaration you can argue about const being const regardless of case etc, but in the end during its usage, these are the same heuristics we can apply given that its a regex grammar. If the issue gets reported multiple times and has lot of demand this can be done for the declaration site as that is the only feasible solution we have.. Given that we can not completely fix this issue and number of reports on this, this at moment would be as is.. |
This is done if peoples ask for a new function or feature. But this is a bug, I thought that the bug fixes are not dependent on the number of votes. Ok if you have a different way... |
This has been reported at least 3 times for my theme. Please consider fixing this. |
This has just been reported again for my theme. |
I'm also coming from @akamud 's theming, please address this issue |
I still believe fixing this is just going to raise more coloring issues than not fixing. Eg. in code: const x = 10;
foo = x; // x cannot be tokenized as const here. That means the color here would be different from declaration. There is no way to do this using just grammar. |
This would be one less coloring issue. For comparison, Atom works like you described and it is better than not having |
please fix this. literally the only thing keeping me from jumping ship from atom to vscode. |
From @dedmazayukr on November 19, 2017 21:20
Why the constant in lower case is defined as a variable ? The constant must be constant, regardless of the register.
Steps to Reproduce:
Write for example: (lowercase and uppercase)
const variable = 'as variable.other.readwrite';
const CONSTANT = 'as variable.other.constant';
Press
ctrl+shift+p
, and selectDeveloper: Inspect TM Scope
Click on word
variable
--> variable.other.readwrite (wrong)Click on word
CONSTANT
--> variable.other.constant (correctly)Reproduces without extensions: Yes
Languages: javascript and typescript
Copied from original issue: microsoft/vscode#38735
The text was updated successfully, but these errors were encountered: