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

Multi-root Workplace in VSCode, Class hides a global class script #769

Open
caioraphael1 opened this issue Dec 29, 2024 · 8 comments
Open
Labels

Comments

@caioraphael1
Copy link

Godot version

4.4-dev7

VS Code version

1.96.2

Godot Tools VS Code extension version

master

System information

Windows 10

Issue description

I know this is a classic, and most likely related to the LSP.

I'm having Class hides a global class script while using Multi workplaces opened.

Image

Each folder on the left represents a different Godot Project.

All projects are part of the same game. I'm making a multiplayer game and managing multiple projects it's a must.

There's only one VSCode instance opened.
There's only one Godot instance opened, related to the Servidor do Jogo folder.

Some configurations:
Image
Image
Image

Do you have any tips on how to make this work?
I know that probably there's not much it can be done related to this Extension, but I'd appreciate some tips or directions about how to solve this.
Thank you

Steps to reproduce

Open VSCode.
Open Godot.

or

Open Godot
Open VSCode.

@DaelonSuzuka
Copy link
Collaborator

Multi-root workspaces are explicitly not supported by the Language Server or by this extension. Each Language Server is only capable of knowing information about a single project, and this extension can only connect to one Language Server at a time.

There's only one VSCode instance opened.
There's only one Godot instance opened, related to the Servidor do Jogo folder.

FYI, your Godot instance doesn't matter because you checked LSP Headless Mode. It's not connecting to your Godot Editor, it's creating an entirely new one in the background.

If you opened each project in its own VSCode instance and used LSP Headless Mode, you could get LSP support on each project, but then you'd have to run 5 extra copies of the entire Godot Editor. That sounds like a bad idea to me.

I'm making a multiplayer game and managing multiple projects it's a must.

This is definitely not true. I worked on several multiplayer games and it's very easy to have everything in one project.

@caioraphael1
Copy link
Author

is there a way to know and control which folder is currently active as to connect to the lsp? I don't mind not having intelisense in all projects, but I'd like to control which project is currently connected with the lsp

@DaelonSuzuka
Copy link
Collaborator

No.

@caioraphael1
Copy link
Author

If I disable Headless mode and close all godot instances, the plugin connects successfully to the LSP. This doesn't seem to make sense. This happens even if I restart vscode.

How can the vscode connect to the lsp, with headless mode off and no godot instances opened?

@DaelonSuzuka
Copy link
Collaborator

Check Task Manager, I would guess there's one (or more) headless Godot instances still running.

@caioraphael1
Copy link
Author

The plugins is openning a headless godot instance, even if Headless is disabled. I need to manually close the headless version in the task manager everytime

@DaelonSuzuka
Copy link
Collaborator

DaelonSuzuka commented Dec 29, 2024

Have you restarted VSCode since disabling headless mode? Are you certain it's not still turned on in one of the workspaces' settings files?

@caioraphael1
Copy link
Author

yes

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

2 participants