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 TM Scopes for generic class methods when generic argument is on a second line. #773

Closed
tyler-brandt opened this issue Sep 9, 2019 · 4 comments
Labels
duplicate limitation Issue is result of tmLanguage limitation where in the lookup does not go beyond current line wontfix Issue is either side effect or limitation that will not be fixed for now

Comments

@tyler-brandt
Copy link

Version: 1.38.0
Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35
Date: 2019-09-03T21:47:00.464Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.2.0

( Also tested with Insiders 1.39.0 )

Steps to Reproduce:

  1. Write a generic class method in TS
  2. Call the generic class method with a type argument spanning multiple lines
  3. Observe that the method call is a different color than it would be if it was only on one line

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

When it only spans a single line, the method name is given TM scope entity.name.function.ts
When it spans multiple lines, it does not have that scope and the first one listed is variable.other.property.ts

image

@mjbvz
Copy link
Contributor

mjbvz commented Sep 10, 2019

Please share the text of the code along with screenshots

@mjbvz mjbvz self-assigned this Sep 10, 2019
@tyler-brandt
Copy link
Author

tyler-brandt commented Sep 10, 2019

interface foo<T> {
  foo: T;
}

class bar {
  doStuff<T>() {};

  notWorking() {
    this.doStuff<foo<{
      test1: number;
      test2: number;
      test3: number;
      test4: number;
      test5: number;
      test6: number;
      test7: number;
      test8: number;
    }>>();
  }

  workingProperly() {
    this.doStuff<number>();

  }
  alsoWorkingProperly() {
    this.doStuff<foo<{bar: number}>>();

  }
}

@mjbvz mjbvz transferred this issue from microsoft/vscode Sep 11, 2019
@mjbvz mjbvz removed their assignment Sep 11, 2019
@mjbvz
Copy link
Contributor

mjbvz commented Sep 11, 2019

Possible duplicate of #479

@sheetalkamat
Copy link
Member

Duplicate of #475 and limitation of textmate grammar syntax

@sheetalkamat sheetalkamat added duplicate limitation Issue is result of tmLanguage limitation where in the lookup does not go beyond current line wontfix Issue is either side effect or limitation that will not be fixed for now labels Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate limitation Issue is result of tmLanguage limitation where in the lookup does not go beyond current line wontfix Issue is either side effect or limitation that will not be fixed for now
Projects
None yet
Development

No branches or pull requests

3 participants