monaco-editor icon indicating copy to clipboard operation
monaco-editor copied to clipboard

Use LSP for TypeScript language features

Open hediet opened this issue 2 months ago • 7 comments

Instead of implementing a custom interface, the TypeScript implementation should just implement the LSP protocol, so that the monaco-editor integration part can be a standard LSP client.

Also, we should try that the minified TypeScript implementation is less than 5MB.

hediet avatar Oct 20 '25 09:10 hediet

how will that work with the new typescript-go version? will typescript-go be runnable as a WASM module?

jogibear9988 avatar Oct 21 '25 08:10 jogibear9988

Will the changes be included in 0.55.0 release?

erosman avatar Nov 20 '25 04:11 erosman

Will the changes be included in 0.55.0 release?

The LSP changes yes, but this ticket is still open.

how will that work with the new typescript-go version? will typescript-go be runnable as a WASM module?

Hopefully, but that is up to the typescript team!

hediet avatar Nov 20 '25 16:11 hediet

Please note that the ts.worker.js minified esbuild size was 6 MB in Monaco Editor v0.54.0 and it is 7 MB in v0.55.0

It is 13.7 MB with Webpack (was 12.* MB in v0.54.0).

erosman avatar Nov 20 '25 17:11 erosman

Do you know what cause the size increase? Did we update TS?

hediet avatar Nov 20 '25 21:11 hediet

It could have something to do with lib.ts and typescript 5.9.3 update.

That file contains 100+ of copyright notices as strings. Could they be done a different way, e.g. as a variable to concatenate?

TBH, I only need CSS & JavaScript workers (no typescript). Is there a way to build a slimmer worker?

erosman avatar Nov 22 '25 20:11 erosman

That file contains 100+ of copyright notices as strings.

That is unfortunate. However, it only increases the editor package by ~80kb.

hediet avatar Nov 24 '25 16:11 hediet