bash-language-server
bash-language-server copied to clipboard
Listen to TCP/Unix Socket for stdin/stdout
I'm using multiple vim instances in different terminals and all of them are spawning a new child process of bash-language-server qhich quite adds up on memory and battery life ;)
What do you think of the idea to create a tcp or unix listener for stdin/stdoud like https://github.com/python-lsp/python-lsp-server does? Therefore there's only one instance running and multiple editors can connect via socket.
I'm not sure how easy this would be to add, but contributions are more than welcome. It would probably be a good idea getting a prototype up and running that could reveal the challenges ahead.
@morph027 I hope adding support for this should be fairly easy. We would just need to edit https://github.com/bash-lsp/bash-language-server/blob/main/server/src/cli.ts ... Especially now as we default to not including all workspace symbols, I don't foresee a lot of issues if multiple editors connects.
I suggest that we would add a flag to the CLI signalling that you want to use TCP/UNIX socket instead of stdin/stout.
Let me know if you want to help out implementing this.
Jip, sounds good. I totally suck when writing js/ts but could take care of all the testing ;)