orta / TypeScript-TSServer-Plugin-Template

53 stars 15 forks source link

Possible to self-host the language server in a web page along with Monaco? #4

Open brianjenkins94 opened 2 years ago

brianjenkins94 commented 2 years ago

I want to build something like a TypeScript language server playground where I can write and test a plugin all on one page.

(Or I wonder if vscode.dev exposes the TypeScript language server at all 🤔 )

orta commented 2 years ago

It's pretty well contained inside the vscode typescript extension ( e.g. you can only send a few tsserver requests via the commands system which I allow-listed) for vscode-web

But the Playgound is also a TSServer language playground, and plugins do get a copy of the tsserver API I think

brianjenkins94 commented 2 years ago

But the Playgound is also a TSServer language playground, and plugins do get a copy of the tsserver API I think

You're saying if I made a plugin here?:

https://www.typescriptlang.org/play

This also seems like it might help me:

https://www.typescriptlang.org/dev/sandbox/

brianjenkins94 commented 1 year ago

More resources while I dig into this again:

Wait, I want the Compiler API not the language server... now I'm not sure anymore.

I found something that looks like what I was about to build for my current needs:

Another project that builds on monaco: