envrc: watch rust.nix shell file; vscode: fix treefmt usage

This commit is contained in:
steveej 2025-03-29 18:17:18 +01:00
parent 1633f7d429
commit c2429b551f
2 changed files with 7 additions and 3 deletions

View file

@ -3,6 +3,7 @@
# Automatically reload when this file changes
watch_file ./nix/devshells/default.nix
watch_file ./nix/devshells/rust.nix
watch_file ./nix/*.nix
# Load `nix develop`

View file

@ -11,15 +11,18 @@
// settings for 'nil' LSP
"nil": {
"formatting": {
"command": ["treefmt-nix", "--stdin", "neverexists.nix"]
"command": ["treefmt", "--stdin", "neverexists.nix"]
}
}
},
"[rust]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "rust-lang.rust-analyzer"
},
"rust-analyzer.interpret.tests": true,
"rust-analyzer.cfg.setTest": true
"rust-analyzer.cfg.setTest": true,
// FIXME(upstream): without these treefmt-vscode will look for a config
"treefmt.command": "treefmt",
"treefmt.config": ""
}