emacs-lsp-booster
emacs-lsp-booster copied to clipboard
Support for GDScript LSP
Thanks for this awesome package @blahgeek
I've noticed that it doesn't apply to GDScript since it doesn't use the stdio
(lsp-register-client
(make-lsp-client :new-connection (lsp-gdscript-tcp-connect-to-port)
:activation-fn (lsp-activate-on "gdscript")
:server-id 'gdscript))
In comparison to something like JS:
(lsp-register-client
(make-lsp-client :new-connection
(lsp-stdio-connection (lambda ()
(cons lsp-clients-deno-server
lsp-clients-deno-server-args)))
...
Is it possible to support GDScript? I don't mind implementing it with a bit of guidance. Thanks!
More context:
lsp-gdscript-tcp-connect-to-port is defined as:
(defun lsp-gdscript-tcp-connect-to-port ()
"Define a TCP connection to language server."
(list
:connect (lambda (filter sentinel name _environment-fn _workspace)
(let* ((host "localhost")
(port lsp-gdscript-port)
(tcp-proc (lsp--open-network-stream host port (concat name "::tcp"))))
(set-process-query-on-exit-flag tcp-proc nil)
(set-process-filter tcp-proc filter)
(set-process-sentinel tcp-proc sentinel)
(cons tcp-proc tcp-proc)))
:test? (lambda () t)))
Actually, on that note: I'm not sure if the GDScript LSP uses JSON in the first place :thinking:
Hello,
see https://github.com/blahgeek/emacs-lsp-booster/pull/33
It's only experimental because I don't really use any language servers that use TCP transport and I'm not sure how should we do the elisp part for configuration. It would be great if you can help testing it.
Hey @blahgeek, awesome! I'll test it out, thanks.