Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve LSP connection behavior (fixes Godot3/4 port issue) #511

Merged
merged 6 commits into from
Oct 29, 2023

Conversation

DaelonSuzuka
Copy link
Collaborator

@DaelonSuzuka DaelonSuzuka commented Oct 13, 2023

This PR internally splits the LSP client connection behavior based on backend 'target". The two possible targets are HEADLESS and EDITOR

When attempting to connect to an EDITOR LSP, if the value of godotTools.lsp.serverPort is either 6005 or 6008, the client will try both ports in succession on each attempt.

The end result is that with default Godot EditorSettings and default extension settings, the language server should Just Work:tm:, no matter what version of Godot is being used.

I'm considering renaming godotTools.lsp.serverPort and godotTools.lsp.serverHost, to soft-reset users to the ideal default values.

@DaelonSuzuka DaelonSuzuka changed the title Add port auto-fallback when attempting to connect to open editor's LSP Improve LSP connection behavior (fixes godot3/4 port issue) Oct 29, 2023
@DaelonSuzuka DaelonSuzuka changed the title Improve LSP connection behavior (fixes godot3/4 port issue) Improve LSP connection behavior (fixes Godot3/4 port issue) Oct 29, 2023
@DaelonSuzuka DaelonSuzuka merged commit 55617fd into godotengine:master Oct 29, 2023
1 check passed
@DaelonSuzuka DaelonSuzuka deleted the lsp_default_ports branch October 29, 2023 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant