Skip to content

eglot connector should default to using port 6005 #169

@1player

Description

@1player

This code:

(defun gdscript-eglot--extract-port (editor-settings-file)
"Extract LSP port from Godot editor settings file."
(when (file-exists-p editor-settings-file)
(with-temp-buffer
(insert-file-contents editor-settings-file)
(when (re-search-forward
(rx "network/language_server/remote_port"
(* space) ?= (* space)
(group (+ digit)))
nil t)
(string-to-number (match-string 1))))))

searches for the network/language_server/remote_port setting in the editor settings file, which is only present if it has been modified from the default value. So, unless you have changed the remote port manually, it will not work.

By default (at least as of 4.4), Godot listens to port 6005, so we should default to that if the regex doesn't return any result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions