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

second rust-analyzer instance started when opening another file in the same project #7

Closed
mrcjkb opened this issue Oct 22, 2023 · 2 comments · Fixed by #8
Closed

second rust-analyzer instance started when opening another file in the same project #7

mrcjkb opened this issue Oct 22, 2023 · 2 comments · Fixed by #8
Assignees
Labels
bug Something isn't working

Comments

@mrcjkb
Copy link
Owner

mrcjkb commented Oct 22, 2023

See also: simrat39/rust-tools.nvim#421

Personally, I can reproduce some of the behaviour with tuxedo-rs:

  1. Open a file in tailor-gui
  2. Open another file in tailord or tailor-cli (e.g. with telescope)
  3. :lua =#vim.lsp.get_clients()

Expected: 1 (I think)
Actual: 2

Expected number of rust-analyzer processes: 1 (I think)
Actual: 2

I believe this has to do with the fact that the plugin searches upward and uses the first directory it finds containing a Cargo.toml as the workspace root.

I cannot reproduce this when jumping from tailor_cli to tailord, or to a dependency, as described in simrat39/rust-tools.nvim#421.

@mrcjkb mrcjkb added the bug Something isn't working label Oct 22, 2023
@mrcjkb mrcjkb self-assigned this Oct 22, 2023
@mrcjkb
Copy link
Owner Author

mrcjkb commented Oct 22, 2023

This actually happens because tailor_gui actually has a different workspace root.

@mrcjkb
Copy link
Owner Author

mrcjkb commented Oct 22, 2023

@mrcjkb mrcjkb linked a pull request Oct 22, 2023 that will close this issue
@mrcjkb mrcjkb closed this as completed in #8 Oct 22, 2023
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

Successfully merging a pull request may close this issue.

1 participant