-
Notifications
You must be signed in to change notification settings - Fork 104
In-browser editors #274
-
Great work. Thank you very much for such a great project.
Would you consider adding the LSP to Monaco editor and/or CodeMirror?
This allows running it in the browser (e.g. in playgrounds and cloud IDEs).
I believe there is an intention to provide a wasm integration. Would this allow such use?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments 3 replies
-
I still need to look into this properly, but afaik Monaco can connect to a remote language server and that would make it possible already today.
The Wasm build would enable us to run the server within the browser too. However, we cannot connect to a real database due to browser restriction. My goal here is to connect to a Pglite instance eventually.
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
New to lsp implementation but I tried connecting it with Codemirror and could not get autocomplete to work. Would love if you can share a small snippet for CodeMirror or Monaco.
Beta Was this translation helpful? Give feedback.
All reactions
-
Did you check this repo? https://github.com/TypeFox/monaco-languageclient
It seems to provide exactly the bridge you need.
Beta Was this translation helpful? Give feedback.
All reactions
-
You may find this useful for codemirror6
https://github.com/FurqanSoftware/codemirror-languageserver
Also, this implements TypeScript autocomplete, lint and hover info for codemirror6. However they did not use LSP
https://github.com/val-town/codemirror-ts
Beta Was this translation helpful? Give feedback.
All reactions
-
for whatever it's worth, as soon as a wasm build is published I plan to integrate it into https://postgres.garden
Beta Was this translation helpful? Give feedback.