yioneko / vtsls

LSP wrapper for typescript extension of vscode
Other
486 stars 7 forks source link

vtsls and typescript-language-server don't retrieve all references when trying to retrieve code references #132

Closed andy-wong-andy-wong closed 1 week ago

andy-wong-andy-wong commented 8 months ago

I'm not sure if this is a vtsls/typescript-language-server issue, or a LSP4J issue, but it seems like there are some references that don't get captured when I try to access the code references via LanguageServer.textDocumentService.references.

However, this only retrieves the first reference of the variable. There are other instances of the references that are not retrieved. The particular issue is in a React Typescript file. The file contains the following:

val variableName = true

... many lines down...

{ variableName &&
...

LSP4J only seems to capture the first reference, and does not grab the second instance.

yioneko commented 8 months ago

You can try it in VSCode. If the same problem could be reproduced there, then I suspect that this is the issue of tsserver, and should be reported to TypeScript.

yioneko commented 1 week ago

Closed due to inactivity. Feel free to reopen one if more information could be provided, like a reproducible example.