godotengine / godot-vscode-plugin

Godot development tools for VSCode
MIT License
1.53k stars 151 forks source link

Change default LSP Port for Godot 4's one #469

Closed jpcerrone closed 1 year ago

jpcerrone commented 1 year ago

Changes the default LSP Port from 6008 (Used in Godot 3) for 6005 (Used in Godot 4). This change was made in https://github.com/godotengine/godot/commit/de7873c2d87c3ee8af8c27e35f49767fcc384e75 .

Also fixes a potential bug in the check_client_status() function. It was wrongly getting the serverPropertyfrom the serverPortconfiguration and viceversa.

xqrdot commented 1 year ago

That would break the compatibility with Godot 3, which is an LTS version of Godot as of now. Ideally, automatic LSP port discovery should be a thing, with "6008" and "6005" being default options.

I'd suggest making a separate PR to fix the check_client_status() method: that fix can easily make its way to an upstream.

DaelonSuzuka commented 1 year ago

That would break the compatibility with Godot 3, which is an LTS version of Godot as of now. Ideally, automatic LSP port discovery should be a thing, with "6008" and "6005" being default options.

This is exactly correct, breaking the existing behavior is not acceptable. I've already been working on this feature, but it's lower priority than finishing the big debugger PR.

jpcerrone commented 1 year ago

Also fixes a potential bug in the check_client_status() function. It was wrongly getting the serverPropertyfrom the serverPortconfiguration and viceversa.

Got it. I'm closing this PR and opening https://github.com/godotengine/godot-vscode-plugin/pull/472 to address the check_client_status() fix.

raylu commented 1 year ago

perhaps we could check the version by running ${editor_path} --version?

alternatively, a fallback port and have the extension try both ports in sequence?