nvarner / typst-lsp

[Deprecated] An early language server for Typst, plus a VS Code extension
MIT License
1.2k stars 77 forks source link

typst-lsp fails to connect to language server in VSCode Live Share #315

Open classabbyamp opened 1 year ago

classabbyamp commented 1 year ago

Issue

typst-lsp fails to connect to language server in VSCode Live Share

To reproduce:

  1. connect to another vscode instance via Live Share
  2. open a typst file

Logs

[Info  - 02:35:44] src/workspace/package/external/manager.rs:48 { message = got user external package directory; user = LocalProvider { root: "/home/abi/.local/share/typst/packages/" }; }
[Error - 02:35:44] Server initialization failed.
  Message: Internal error
  Code: -32603 
[Error - 02:35:44] Typst Language Server client: couldn't create connection to server.
  Message: Internal error
  Code: -32603 
[Info  - 02:35:44] src/workspace/package/external/manager.rs:58 { message = got external package cache; cache = LocalProvider { root: "/home/abi/.cache/typst/packages/" }; }
[Info  - 02:35:44] src/workspace/package/manager.rs:42 { message = initialized package manager; current = {Url { scheme: "vsls", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/", query: None, fragment: None }: Package { root: "vsls:/" }}; external = ExternalPackageManager { providers: [LocalProvider { root: "/home/abi/.local/share/typst/packages/" }, LocalProvider { root: "/home/abi/.cache/typst/packages/" }], cache: Some(LocalProvider { root: "/home/abi/.cache/typst/packages/" }), repo: Some(RemoteRepoProvider { base_url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("packages.typst.org")), port: None, path: "/", query: None, fragment: None }, client: Client { accepts: Accepts, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*"}, timeout: 30s } }) }; }
[Error - 02:35:44] src/server/lsp.rs:56 { message = could not register workspace files on init; err = the provider does not provide the requested URI; }
nvarner commented 1 year ago

Was the typst-lsp extension installed on the other VS Code instance? If not, I believe this is expected behavior, poorly reported to the user (but I don't know Live Share well enough to say for sure).