vtsls icon indicating copy to clipboard operation
vtsls copied to clipboard

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

Open andy-wong-andy-wong opened this issue 1 year ago • 1 comments
trafficstars

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.

andy-wong-andy-wong avatar Jan 17 '24 23:01 andy-wong-andy-wong

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 avatar Jan 18 '24 03:01 yioneko

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

yioneko avatar Sep 21 '24 13:09 yioneko