Sachin10mo ago

Deno LSP in a Web Worker

Has anyone come across the lsp running in a web worker? I have an online editor (Monaco) that people are using to write Typescript that runs on Deno. We can add support Deno's types relatively easily but the built-in TS lsp with Monaco doesn't support remote imports.
1 Reply
Deno AI Helper
Deno AI Helper10mo ago
The documentation does not provide a clear answer to your question about running Deno's Language Server Protocol (LSP) in a web worker. However, it's important to note that Deno does support the Web Worker API, which allows you to run code on multiple threads. Each instance of a Worker is run on a separate thread, dedicated only to that worker. However, there are some limitations to be aware of. For example, workers currently do not work in compiled executables. Also, use of relative module specifiers in the main worker are only supported with --location <href> passed on the CLI, which is not recommended for portability. As for the LSP, Deno's LSP provides a number of features, including support for per resource configuration as part of the LSP protocol. This allows you to have specific configurations for different folders in Visual Studio Code, for example. However, the documentation does not provide specific information about running the LSP in a web worker. If you're having technical issues with this, it might be helpful to provide more details about the problem you're experiencing, so we can give more targeted advice or ask follow-up questions. 🦕