Compare commits
2 commits
3b852b7073
...
c2429b551f
Author | SHA1 | Date | |
---|---|---|---|
c2429b551f | |||
1633f7d429 |
3 changed files with 9 additions and 14 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
# Automatically reload when this file changes
|
# Automatically reload when this file changes
|
||||||
watch_file ./nix/devshells/default.nix
|
watch_file ./nix/devshells/default.nix
|
||||||
|
watch_file ./nix/devshells/rust.nix
|
||||||
watch_file ./nix/*.nix
|
watch_file ./nix/*.nix
|
||||||
|
|
||||||
# Load `nix develop`
|
# Load `nix develop`
|
||||||
|
|
9
templates/default/.vscode/settings.json
vendored
9
templates/default/.vscode/settings.json
vendored
|
@ -11,15 +11,18 @@
|
||||||
// settings for 'nil' LSP
|
// settings for 'nil' LSP
|
||||||
"nil": {
|
"nil": {
|
||||||
"formatting": {
|
"formatting": {
|
||||||
"command": ["treefmt-nix", "--stdin", "neverexists.nix"]
|
"command": ["treefmt", "--stdin", "neverexists.nix"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"[rust]": {
|
"[rust]": {
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
"editor.defaultFormatter": "rust-lang.rust-analyzer"
|
||||||
},
|
},
|
||||||
"rust-analyzer.interpret.tests": true,
|
"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": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,21 +8,12 @@ pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
flake.formatter.${system}
|
flake.formatter.${system}
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
|
pkgs.nil
|
||||||
];
|
];
|
||||||
|
|
||||||
# Add environment variables
|
# Add environment variables
|
||||||
env = { };
|
env = { };
|
||||||
|
|
||||||
# Load custom bash code
|
# Load custom bash code
|
||||||
shellHook =
|
shellHook = '''';
|
||||||
# TODO(blocked/upstream): remove this once https://github.com/isbecker/treefmt-vscode/issues/3 is resolved
|
|
||||||
# (flake.inputs.nixago.lib.${system}.make {
|
|
||||||
# data = flake.formatter.${system}.settings;
|
|
||||||
# output = "treefmt.toml";
|
|
||||||
# format = "toml";
|
|
||||||
# }).shellHook
|
|
||||||
# +
|
|
||||||
''
|
|
||||||
echo $(git rev-parse --show-toplevel)
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue