This creates a .vscode
folder (if needed) and populates it with a
settings.json
template. If already exists, it will be updated to include
the rust-analyzer.linkedProjects
setting.
Details
Rust-Analyzer VSCode extension looks for a Cargo.toml
file in the
workspace root by default. This function creates a .vscode
folder and
populates it with a settings.json
file that sets the workspace root to
the src
directory of the package. This allows you to open the package
directory in VSCode and have the Rust-Analyzer extension work correctly.