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

Using LSP for GDScript with 2 different projects at once is impossible #8593

Closed
van800 opened this issue Dec 6, 2023 · 2 comments
Closed
Labels

Comments

@van800
Copy link

van800 commented Dec 6, 2023

Describe the project you are working on

I am working on the integration of Godot and JetBrains Rider (link).
However the problem applies to all external editors, which rely on the LSP.

Describe the problem or limitation you are having in your project

Using LSP for GDScript with 2 different GodotEditor headless instances is impossible, because they would try to use the same socket address.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

LSP spec states that socket: uses a socket as the communication channel. The port is passed as next arg or with --port=.
Link
Following that spec would allow IDE to start each headless GodotEditor with LSP server on a random free port.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Ideally, consider that LSP is disabled in the main Godot Editor, but enabled in the headless ones, each of those use their own port for communication.

Alternative solution might be implementing SdtIO communication channel for LSP in a headless GodotEditor.
#464

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't see how this can be workarounded within the current design

Is there a reason why this should be core and not an add-on in the asset library?

@van800 van800 changed the title Using LSP for GDScript with 2 different headless GodotEditor instances is impossible Using LSP for GDScript with 2 different projects at once is impossible Dec 6, 2023
@YuriSizov
Copy link
Contributor

You can specify different ports manually with --lsp-port, see godotengine/godot#81844. Does that not help?

@van800
Copy link
Author

van800 commented Dec 6, 2023

That will do. Thank you!
As far as I understand the change, the only missing part is that it doesn't allow overriding LSP "enabled/disabled".
So it would be either running in both headless and regular GodotEditor or not running at all.

@van800 van800 closed this as completed Dec 6, 2023
@KoBeWi KoBeWi added the archived label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants