This repository was archived by the owner on Nov 18, 2022. It is now read-only.
Allow having Cargo.toml in a subdirectory with rust-client.cargoSubdir
#334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #222.
This patch is quite hacky and may reveal my lack of knowledge on the RLS or
LSP architectures. My idea was to give the user the opportunity using the
variable
rust-client.cargoSubdir
to select a subdirectory as the root forthe Cargo.toml file.
To do that, I hacked the vscode's workspaceFoldervariable; my hack won't
work with multi-workspaces.
Alternate solutions:
to the existing
omitInitBuild
in the rls server) that would set adifferent path that the one given by vscode's workspaceFolder.
(mentionned in Implement Workspace Folders LSP protocol extension rls#608)
but this does not really help when we want to open a general project
where one of the subfolders is a rust project.
must use the 'Multi-crate projects' feature or the 'rlsCommandOverride'
feature (see README at https://github.com/mehcode/atom-ide-rust).