Closed alsoLut closed 2 years ago
Sounds like a good idea! Do you want to file a PR?
Sadly, I don't have the time to set up the development env in order to make a PR. But from what I've seen on other extensions, this can be added like this:
In https://github.com/rust-lang/rust-analyzer/blob/master/editors/code/package.json
you have to add:
{
// ....
"contributes": {
// ....
"configurationDefaults": { // <- add this object
"explorer.fileNesting.patterns": {
"Cargo.toml": "Cargo.lock"
}
}
}
}
More info here: https://code.visualstudio.com/api/references/contribution-points#contributes.configurationDefaults
I'm using Code (OSS version from arch repos) v1.73.0 and rust-analyzer v0.4.1284 (latest nightly from OpenVSX) and I'm not seeing this behavior. It should be there considering the PR was merged 6d ago, right?
edit: Ah, it looks like explorer.fileNesting.enabled
has to be set to true
first.
In VS Code you can add:
"explorer.fileNesting.patterns": { "Cargo.toml": "Cargo.lock" },
In order to collapse .toml and .lock under one file (you can still expand it if you want).
I think this rule you be added by default by rust analyzer plugin.