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

Type annotations are incorrectly labelled as variables in TM scopes #66149

Closed
Foxhoundn opened this issue Jan 7, 2019 · 5 comments
Closed

Type annotations are incorrectly labelled as variables in TM scopes #66149

Foxhoundn opened this issue Jan 7, 2019 · 5 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@Foxhoundn
Copy link

  • VSCode Version: 1.30.1
  • OS Version: 10.14

Steps to Reproduce:

  1. Create a theme and assign color to variable.other.readwrite
  2. Create a function with enough parameters for the function to be broken to multiple lines

screenshot 2019-01-07 at 15 21 54

It works fine if at least one of the parameters is inline

screenshot 2019-01-07 at 15 27 58

Also! The async modifier is labelled as function call, which is incorrect as well.

screenshot 2019-01-07 at 15 30 46
screenshot 2019-01-07 at 15 31 14

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

@Foxhoundn Foxhoundn changed the title Sometimes, type annotations are incorrectly labelled as variables in TM scopes Type annotations are incorrectly labelled as variables in TM scopes Jan 7, 2019
@Foxhoundn
Copy link
Author

Another occurrence of this bug.

screenshot 2019-01-08 at 11 52 40

@mjbvz
Copy link
Collaborator

mjbvz commented Jan 8, 2019

Please share the text of the code along with all screenshots

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Jan 8, 2019
@Foxhoundn
Copy link
Author

Foxhoundn commented Jan 8, 2019

Please share the text of the code along with all screenshots

For obvious reasons I can't share all of the code, all you need to do is create a file with

const someFunction = something(
  async (
    asg: string,
    sagsag: string,
    asgasgsag: string,
    aaa: string,
    wwqewqewqe: string
  ) => {
    // ...
  }
)

And it happens

@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) grammar Syntax highlighting grammar labels Jan 9, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 9, 2019

Thanks. Opened microsoft/TypeScript-TmLanguage#705 to track this upstream

@mjbvz mjbvz closed this as completed Jan 9, 2019
@mjbvz mjbvz removed the info-needed Issue requires more information from poster label Jan 9, 2019
@gerroon
Copy link

gerroon commented Feb 9, 2019

Any word on this? This is really annoying in Python :( I assume it is the same issue.

See https://www.python.org/dev/peps/pep-0526/

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

3 participants