-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
More flexibility in root_dir selection inside a workspace for large monorepo #286
Comments
Hey 👋 Do you have a qualitative example of what setting the workspace root via
That sounds reasonable, if rust-analyzer supports changing the configuration on the fly. |
Possibly related for your use case: LazyVim/LazyVim#2720 |
Thanks for your time !
Here is a very minimal repro repo that I used to troubleshoot before. There are two service, and as I see it ideal behavior would be
We do not use them for now, but this is definitely the cleanest way of doing this, so it would solve my problem indeed. |
Thanks.
I had a closer look at it - multi-root-workspaces seems to be out of scope for rustaceanvim, as neovim doesn't have a concept of workspaces or projects. Something like that would probably be better handled by a dedicated plugin, like project.nvim. |
Agreed, I don't think it's this plugin's responsibility. If you do not have time to look into solving my issue, I will look into it over the week-end and propose a PR if I can. |
Feature description
Hello !
First of all, thanks for the awesome and clean plugin.
LazyVim just switched to this plugin and I am having some issues due to a weird workflow on my end.
I work in a very big Rust monorepo, with hundreds of crates in a single workspace, and the workaround for dev sanity has been to use local .vscode/settings.json for each crate to override the rust analyzer check command to scope the lsp checks to the crate the dev is working on, since most people work on VSCode.
Until now, since rust-tools used nvim-lspconfig, there was some sort of a hack that would rely on neoconf and set the root_dir to wherever
.vscode/settings.json
was used. It is dirty, but it worked well and loaded the settings as expected.I was thinking of using the dynamic settings, but it seems some smart autodetection is done here which forces the workspace root to be given to the
load_rust_analyzer_settings
function.Right now, by forking and prioritizing the crate root in the dirtiest way possible it works fine, but I was wondering if this could be a config option ? Let me know if this is already too specific of a use case 😬
The next step for my workflow would be to make use of the
workspace/didChangeConfiguration
notification on buffer enter so that the check command is updated whenever I open a file from another workspace, but this is starting to be very specific, so I can implement this in my own config if you think no one will be interested.The text was updated successfully, but these errors were encountered: