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: Ruijie Yu
Subject: bug#62795: 29.0.90; eglot: gdscript default port is 6005
Date: Mon, 17 Apr 2023 15:33:40 +0800
User-agent: mu4e 1.9.22; emacs 30.0.50

xiliuya via "Bug reports for GNU Emacs, the Swiss army knife of text editors" 
<bug-gnu-emacs@gnu.org> writes:

> I have modified it according to your suggestion, is that OK?
> I tested it locally and it works.
>
> ```emacs-lisp
>   (defun gdscript-eglot-contact (&optional _interactive)
>     "Produce a suitable value for LSP contact in `eglot-server-programs'."
>     (list "localhost"
>           (string-to-number
>            (with-temp-buffer
>              (insert-file-contents
>               (expand-file-name "~/.config/godot/editor_settings-4.tres"))
>              (goto-char (point-min))
>              (goto-char (+ 39 (string-match
>                                "network/language_server/remote_port"
>                                (buffer-string))))
>              (buffer-substring
>               (point)
>               (line-end-position))))))
> ```
>
>> If the function is made simple enough and portable across operating
>> systems where the Godot engine runs, then a lambda version of it can be
>> added to eglot.el IMO.  But it's really better to add it to
>> gdscript-mode.el, wherever it is maintained.
>>
>> João
>
> I submitted this question to the gdscript-mode codebase, but haven't
> heard back yet.
> [issues/121](https://github.com/godotengine/emacs-gdscript-mode/issues/121)

I'll try to file a PR in that repo for this function within a few hours,
will send an update to this thread when done.

-- 
Best,


RY





reply via email to

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