emacs-gdscript-mode
emacs-gdscript-mode copied to clipboard
Run Godot in headless mode if application is not running and/or port is not responding
I was looking for a way to run the gdscript LSP without using the Godot engine GUI, however since I didn't want to port the language server from the Godot source just yet I dug around in their documentation. I found that the editor can run headless which is pretty much what I wanted.
godot -e --headless --lsp-port <desired port> --path <project_path>
Some benefits of setting the port explicitly is that multiple projects can be opened simultaneously without the LSP shitting the bed. Since my elisp fu is not excellent I was wondering if someone might point me in the right direction.
If this could be implemented I'm thinking there are two ways to do it. 1) Scrap the old setup entirely and launch a godot instance per lsp workspace or 2) ping the port from the configuration to see if anyone's home and if not launch a headless instance.