leaphy-robotics / leaphy-webbased-svelte

Leaphy Easybloqs is software to program Leaphy Robots and Arduino microcontrollers using a block-based programming language.
https://leaphyeasybloqs.com
1 stars 2 forks source link

[research] Use a language server for the monaco editor #20

Open rmoesbergen opened 6 months ago

rmoesbergen commented 6 months ago

We're using monaco as the code editor for both c++ and python views. It supports connecting to a 'language server' for code completion/intellisense/etc. However: the server component is not built for multi-user usage. It assumes it runs on the same pc as the dev environment and has local file access. This is not really an option for leaphy, since we don't run local software. Let's research if we can have a 'central' language server (on the leaphy server), instead of running it on de developer pc.

We'll need a solution for the 'multi-user' problem and a way to transport the code 'file' to the server so the language server can access it. It also needs to be resource efficient with many simultaneous users.

https://clangd.llvm.org/

rmoesbergen commented 6 months ago

Tried this, but waay too slooow: https://github.com/Guyutongxue/clangd-in-browser

koen1711 commented 1 month ago

Clangd seems like an option again, it seems to be fast enough. Will be checking with more opinions and searching for alternatives soon.