bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62795: 29.0.90; eglot: gdscript default port is 6005


From: xiliuya
Subject: bug#62795: 29.0.90; eglot: gdscript default port is 6005
Date: Sun, 16 Apr 2023 11:48:05 +0800
User-agent: mu4e 1.10.2; emacs 29.0.90

João Távora <joaotavora@gmail.com> writes:

> I see.  So it's not an inferior process to Emacs. Then
> maybe a function can be crafted in Elisp -- and housed
> in gdscript-mode -- that somehow discovers if the Godot
> Engine is running and finds the correct port.  Then
> gdscript-mode can add that function to eglot-server-programs.

I wrote this function to add gdscript-mode:
-----
(defun eglot-add-gdscript-lsp ()
  (let* ((lsp-port (string-to-number
                    (shell-command-to-string
                     "awk -F'=' '/network\\/language_server\\/remote_port/ 
{print $2;}' $HOME/.config/godot/editor_settings-4.tres")))
         (lsp-list (cons 'gdscript-mode  (list "localhost" lsp-port
                                               ))))
    (push  lsp-list
           eglot-server-programs)))
-----

-- 
xiliuya :)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]