Skip to content

How to build the file system of monaco editor? #551

Answered by CGNonofr
newfish-cmyk asked this question in Q&A
Discussion options

You must be logged in to vote

The language server runs on the real filesystem, so you either need a way to access the server filesystem from the client, or synchronize the client changes on the filesystem

There is multiple way of doing it:

  • just watching the model change and writing them to the disk (not recommended)
  • implement and registering a filesystem overlay (using registerFileSystemOverlay from codingame/monaco-vscode-files-service-override) (nice but not trivial to implement, requires a channel and a protocol)
  • use the vscode ext-host server (fully automatic, but has some downside: it requires its own websocket, it needs to be up and running from the beginning, you can't disconnect/reconnect to it...)

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@CGNonofr
Comment options

@CGNonofr
Comment options

@newfish-cmyk
Comment options

@kaisalmen
Comment options

@CGNonofr
Comment options

Answer selected by newfish-cmyk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants