-
Notifications
You must be signed in to change notification settings - Fork 931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: support additional language servers #336
Comments
Please @EricSimons We have Polymer IDE extension |
@rictic @JosefJezek I love this idea. We actually just implemented the Angular language service on stackblitz; we'd love to also have support for all the other ones out there. Would either of you be able help create a proof of concept for this? Our eng timeline is completely packed for the next 2-3 months, so external help sorting out the implementation details/challenges would be 💯 |
@rictic @EricSimons I found a module for Monaco... And Theia IDE is nice base... |
@EricSimons I'd be interested, what would you be looking for out of a proof of concept? Here's a Monaco editor running the Polymer team's language server via an in-browser web worker. The integration is a little sloppy there, when I set that up monaco-languageclient seemed pretty limited so I use a simple wrapper to translate the LS protocol to something that's closer to the monaco API. It seems like stackblitz might be using more of vscode than just monaco though? I poked around a bit but I couldn't find the source for the editor anywhere. If you've got other language services working it seems like the major design considerations are taken care of (e.g. URL scheme, document model, persistence, etc). A few questions for ya'll: Do you run the language servers on the client or the server? What were the sorts of issues you needed to resolve and modifications you needed to make for the typescript and angular language servers? |
Summary from chatting on discord:
I'll poke around at that, probably this weekend! |
@rictic Can you run arbitrary language servers in web workers? Language servers assume that they have access to the filesystem and can run local tools. APIs available to web workers are very limited, mostly they can do async requests as far as i know. |
VSCode/Monaco supports extension through the Language Server Protocol.
It would be really awesome to be able to enhance the editing experience for a project or an embed by adding additional language servers. For example, the Polymer team maintains a language server that provides enhanced linting and autocompletion for custom elements, HTML templates, and some Polymer-specific features. It probably doesn't make sense to run this server for all users, but it would be really great to be able to run it.
The natural way to run a language server in the browser is in its own web worker. The API could be as simple as the user specifying a set of urls of their web workers' sources. The worker/host could then communicate entirely with the language server protocol over postMessage.
The text was updated successfully, but these errors were encountered: