Skip to content

worker-based LSP server#5156

Draft
hediet wants to merge 1 commit intomainfrom
hediet/lsp-worker
Draft

worker-based LSP server#5156
hediet wants to merge 1 commit intomainfrom
hediet/lsp-worker

Conversation

@hediet
Copy link
Copy Markdown
Member

@hediet hediet commented Dec 19, 2025

Prepares for #5148

@giautm
Copy link
Copy Markdown

giautm commented Dec 22, 2025

Hey @hediet, thank you for working on this. 🙏 .

We were using monaco-editor for a long time, but always struggle with the LSP support.

I'm so happy to see this implement in the monaco project. I hope you can finish it soon, and expose enought APIs for public usage.

My situation is about LSP-Server in Webworker (WASM-base), connect with the monaco like you did there.

@hediet
Copy link
Copy Markdown
Member Author

hediet commented Jan 13, 2026

@giautm LSP client support is already in! This is about making it easy to create LSP servers in a webworker.

@giautm
Copy link
Copy Markdown

giautm commented Jan 13, 2026

@giautm LSP client support is already in! This is about making it easy to create LSP servers in a webworker.

Yes, I found the playground after comment there. And I was successful to integrate the LSP client with my LSP Server running in WASM. However, I need some "hack" to inject extra features to the client. I need access to the _connection which is not exported right now. Also the connection type is not exposed yet.

// LSP Client setup
class WasmFeature {
  constructor(c: any) {
    c.capabilities.addStaticClientCapabilities({
      experimental: {
        noFilesystem: true,
      },
    });
  }
  dispose() {}
}

class AtlasLspClient extends lsp.MonacoLspClient {
  createFeatures() {
    const store = super.createFeatures();
    //@ts-ignore
    store.add(new WasmFeature(this._connection));
    //@ts-ignore
    console.log("LSP Features initialized:", store, this._connection);
    return store;
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants