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 20:29:18 +0800
User-agent: mu4e 1.10.3; emacs 29.0.90

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

> If it's not clear, let us know.

Yes, that's clear. It was my misunderstanding.

> Another detail: I think the use of `awk` can probably be be optimized
> away Elisp code for processing text.  Same for the shell use of $HOME
> which is also has an Elisp abstraction (see docstring of
> `expand-file-name`).  In theory, you don't need shell-command-to-string
> at all.

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)

-- 
xiliuya :)





reply via email to

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