Closed unlight closed 3 years ago
Is the URI not a file:
URI?
@rwols
No, it starts from letter C:/...
Can you show what the payload of the response to textDocument/definition is?
To see server payloads, put "log_server": ["panel"] in Packages/User/LSP.sublime-settings, then open the log panel by running LSP: Toggle Log Panel. Then re-do your steps to trigger the request.
If the server returns literal filepaths, then I think what happens is that we accidentally use C:
as the URI scheme.
:: --> LSP-typescript textDocument/definition(35): {'textDocument': {'uri': 'file:///C:/Dev/project/xxx/workers/cancel_shipment.js'}, 'workDoneToken': 'wd35', 'position': {'line': 27, 'character': 20}}
:: <<< LSP-typescript 35: [{'uri': 'C:/Dev/project/xxx/lib/accounting/index.js', 'range': {'end': {'line': 4, 'character': 15}, 'start': {'line': 4, 'character': 8}}}, {'uri': 'C:/Dev/project/xxx/lib/accounting/combine.js', 'range': {'end': {'line': 146, 'character': 16}, 'start': {'line': 146, 'character': 9}}}]
Thanks. That doesn’t look like an URI to me in the server response. So it’s a server issue.
Version v1.3.1 with the fix is now on package control.
Subject. It is started few days ago. Looks like it is related to "typescript-language-server": "0.6.0" or latest lsp typescript 1.3.0
I tried to rollback to previous 0.5.1, but it updates automatically without asking.
Also I noticed weird suggestion (when doing lsp goto definition), it should be:
{file}:{Line}
Env: ST 4112 LSP typescript: 1.3.0 Windows 10 Node 14.17.5