textDocument/definition returns git:// uris
Go to definition on any symbol from an imported package (eg. ts.nodeModuleNameResolver):
LSP: request 5: textDocument/definition
LSP: got json: {"jsonrpc":"2.0","id":5,"result":[{"uri":"git://github.com/Microsoft/TypeScript?v2.3.4#lib/typescript.d.ts"
Not sure if VS Code handles this, but a reference to a local path where the package is installed should work on any editor.
This is only for TypeScript library files. Could use a local URI if installed.
Under what condition could the logic in https://github.com/sourcegraph/javascript-typescript-langserver/blob/2391d4a9b97808a901fff33adbfd9f14c5a1f473/src/symbols.ts#L39 be changed to return a file:// uri?
Removing the check fixes jump-to-definition to ts.nodeModuleNameResolver, but knowing it only affects the Typescript API this is not a huge priority (fine with closing)
If the definition is available locally in node_modules on the client's machine it can return a file:// URI to that. If it is only found in the node_modules of the language server though that would be tricky because the language server can run on a different host (e.g. inside a container) so the file:// URI would be wrong on the client.
I'm noticing this too. My current workflow is to lookup definition and then look at URL outputted by javascript-typescript-langserver to know which file to open locally. After having opened the file once the definition lookup works like one would think it would.