Replies: 2 comments 7 replies
-
Monaco editor provides a client worker for typescript/javascript (and some others) and we use it. We also use a real TypeScript language server on apps with more requirements (to add libraries, to add angular extension)
We are using Monaco because we just need an editor. I don't know about the complexity of building such UI on vscode server
Yes, we're sharing a single process across multiple users, each user in their own "workspaceFolder"
At one place only. And monaco is not the source of truth, firebase is. So we're just creating and disposing models as we need them or not.
Everything seems to be clear to you :) |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the answers :)
I might have a couple more questions as we start implementing this, especially on the backend side, so sorry about that! |
Beta Was this translation helpful? Give feedback.
-
I would like to use this library to improve my project's typescript intellisense.
I've looked at a lot of different options and it seems like this library is my best bet.
You really did an amazing job and having it open source is really appreciated.
TDLR is that I want to understand if there are any major gotchas, risks and generally stuff that will make integrating this into Wix easier...
I'm including your answers from the email discussion we had.
Regarding the questions in the TLDR, you replied with:
My Proposed Architecture
Questions
I would love to know if, for CodinGame, you went with a server so you can use the full power of tsserver and if so, have you explored client-side only solutions?
Are you using monaco and not something like Gitpod's vscode server to compose a custom UI that fits your uses?
You said:
By "language server" do you specifically mean something like
typescript-language-server
?Or do you mean you're sharing one actual server that just exposes multiple endpoints for users to connect via web socket?
With that solution, you'd still run multiple
tsserver
processes, right?Have you also implemented something like a file tree that connects with monaco? Would that be done by providing custom services to monaco?
Thanks for taking the time!
My understanding of
monaco-languageclient
I'll just dump my understading of
monaco-languageclient
here for future readers.One of which is vscode-languageclient.
BaseLanguageClient
class that can easily be extended.BaseLanguageClient
class is how you can create language server extensions (See the official VSCode guide)It exposes the
start()
,stop()
andcreateMessageTransports()
methods.View the code
BaseLanguageClient
class but provides a different implementation for the protected methodcreateMessageTransports
.createMessageTransports
provides thereader
andwriter
that we created, and those are connected to our WebSocket directly.View the code
View the code
Beta Was this translation helpful? Give feedback.
All reactions