Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for GDScript LSP #31

Open
anonimitoraf opened this issue Dec 8, 2024 · 4 comments · May be fixed by #33
Open

Support for GDScript LSP #31

anonimitoraf opened this issue Dec 8, 2024 · 4 comments · May be fixed by #33

Comments

@anonimitoraf
Copy link

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!

@anonimitoraf
Copy link
Author

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)))

@anonimitoraf
Copy link
Author

Actually, on that note: I'm not sure if the GDScript LSP uses JSON in the first place 🤔

@blahgeek
Copy link
Owner

Hello,

see #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.

@blahgeek blahgeek linked a pull request Dec 21, 2024 that will close this issue
@anonimitoraf
Copy link
Author

Hey @blahgeek, awesome! I'll test it out, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants