How to Handle File Operations #1450
-
My editor is hosted in the browser with the language server running in a web worker so I am wondering how should we go about handling file operations in the language server where you are outside of the Node context. We could send LSP messages from the client in the browser to the server in the worker, but I am wondering if this is already handled for us in Langium v3.0.0 using the workspace. My guess is that I should implement a custom Am I thinking about this correctly? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 21 replies
-
Hey @ballcoach12, open/change operations should be handled by the language server by default using the appropriate editor LSP messages. For creation/deletion and rename (which is effectively just a deletion + creation), you will need the Note that the language server will then attempt to load the created document, so you need a browser based implementation of |
Beta Was this translation helpful? Give feedback.
I received this notification, but I don't see it here. 🤔
buildWorkerDefinition
is outdated. I introducedconfigureMonacoWorkers
with v4 of the wrapper. The new function is more flexible. You can use the bundle version like this: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/python/client/main.ts#L…