You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally we would even version the config (maybe with a stamp file so it's not in the settings.json file itself) and suggest rerunning x setup in tidy if the config in .vscode gets outdated.
I also considered checking .vscode into git, but that doesn't allow people to modify it locally, and doesn't allow the config to be different depending on the profile.
I think this is fine so long as x setup prompts the user asking if they want this, with options for yes/no/print, where print just dumps the settings json it wants to add to stdout or whatever.
And probably if .vscode/settings.json already exists you should just always print instead of trying to modify it in-place (modifying sounds hard since that file allows comments, and i would be pretty mad if they got overwritten).
Activity
jyn514 commentedon Feb 5, 2023
I also considered checking
.vscodeinto git, but that doesn't allow people to modify it locally, and doesn't allow the config to be different depending on the profile.thomcc commentedon Feb 5, 2023
I think this is fine so long as
x setupprompts the user asking if they want this, with options for yes/no/print, where print just dumps the settings json it wants to add to stdout or whatever.And probably if .vscode/settings.json already exists you should just always print instead of trying to modify it in-place (modifying sounds hard since that file allows comments, and i would be pretty mad if they got overwritten).
jyn514 commentedon Feb 5, 2023
👍 sounds good - we do something like that today for the pre-push hook:
rust/src/bootstrap/setup.rs
Lines 375 to 389 in 4aa6afa
jyn514 commentedon Feb 6, 2023
Prior art: https://github.com/rust-lang/rust-clippy/blob/8a9860901f0ae9782ff23fb793838a16f733a60b/clippy_dev/src/setup/vscode.rs
Rollup merge of rust-lang#107757 - clubby789:setup-settings-json, r=j…
Rollup merge of rust-lang#107757 - clubby789:setup-settings-json, r=j…