microsoft/vscode-wasm

Provide example for WASI based LSP

ctron opened this issue · 1 comments

ctron commented

I am trying to wire this up, but instead of just calling a main method once, I would like to wire this up using an LSP server (based on tower_lsp).

My biggest problem seems to be, how to wire up the I/O of the LSP with the client side in the addon. Is there any information on how to approach this? I wasn't able to find any, but maybe I just didn't spot it.

The wiring of the file I/O is done my mounting the VS Code workspace files as a folder into the WASM/WASI host. See https://vscode.dev/github.com/microsoft/vscode-wasm/blob/fc0267dabe782a93dc08ed8f7dd90edd4c9151eb/testbeds/python/worker.ts#L23 as an example.

Let me know if this helps.