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

go: embedded projects not being detected #3549

Open
kkrime opened this issue Jan 8, 2025 · 3 comments
Open

go: embedded projects not being detected #3549

kkrime opened this issue Jan 8, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@kkrime
Copy link

kkrime commented Jan 8, 2025

Description

If we have the following:
outter_project: /User/kkrime/go/src/outter_project
inner_project: /User/kkrime/go/src/outter_project/inner_project

Both projects are vaild projects with all the files you'd expect in the root of a project folder to be detected by the lsp.

If you open the outter_project first then open the inner_project, only the outter_project will be in the workspace_folders

nvim outter_project/main.go outter_project/innner_project/main.go -O

If you do it the other way round i.e first open the inner_project then open the outter_project, both projects will be in the workspace_folders

nvim outter_project/innner_project/main.go outta_project/main.go -O

both projects shouild be in workspace_folders in both senarios

@kkrime kkrime added the bug Something isn't working label Jan 8, 2025
@justinmk
Copy link
Member

justinmk commented Jan 8, 2025

This sounds similar to #3515

You did not even mention which "root markers" are in these projects ?

@justinmk justinmk changed the title embedded projects not being detected go: embedded projects not being detected Jan 8, 2025
@kkrime
Copy link
Author

kkrime commented Jan 8, 2025

This sounds similar to #3515

You did not even mention which "root markers" are in these projects ?

I'm using .git to identify the root of the project

@kkrime
Copy link
Author

kkrime commented Jan 9, 2025

FYI @justinmk I tested #3515 on that branch, in both senarios in the description, only the root directory of the first file will be returned, the root directory of the second file does not get detected.

So:
nvim outter_project/main.go outter_project/innner_project/main.go -O
the workspace_folders will only ever contain outter_project as the root, even when switching buffers to the second file

and
nvim outter_project/innner_project/main.go outta_project/main.go -O
the workspace_folders will only ever contain inner_project as the root, even when switching buffers to the second file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants