I wanted to integrate Clangd with Monaco Editor and while trying to achieve this I found that I can't start Clangd via Web Sockets.
When I run clangd in my terminal, it outputs Starting LSP over stdin/stdout, is there a way to let it launch a web socket server or do I have to implement this myself? I'm aware that the Python LSP has a --ws flag you can turn on to start a server. But I didn't find something like that with Clangd.
Or is there a better way to integrate Clangd with Monaco Editor? I'm currently going with Monaco Language Client.
Thanks in advance!
Success Demo
You can use a proxy server that convert clangd stdout to websocket, like that:
servers.yml:Notice that the
/projdir must cotains thecompile_commands.jsonfile that can generate bybeartool (apt install -y bear).