mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 04:58:01 +00:00
config: add treefmt as formatter tool
This commit is contained in:
parent
025e506499
commit
5ea8fcb0cf
@ -388,7 +388,7 @@
|
|||||||
# No amount of formatters will make this codebase nicer but it sure does
|
# No amount of formatters will make this codebase nicer but it sure does
|
||||||
# feel like it does.
|
# feel like it does.
|
||||||
formatter =
|
formatter =
|
||||||
forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
|
forAllSystems (system: nixpkgs.legacyPackages.${system}.treefmt);
|
||||||
|
|
||||||
# nixops-lite... in here!?! We got it all, son!
|
# nixops-lite... in here!?! We got it all, son!
|
||||||
#
|
#
|
||||||
|
@ -8,10 +8,16 @@ pkgs.mkShell {
|
|||||||
jq
|
jq
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
sops
|
sops
|
||||||
|
treefmt
|
||||||
|
|
||||||
# Language servers for various parts of the config that uses a language.
|
# Language servers for various parts of the config that uses a language.
|
||||||
sumneko-lua-language-server
|
sumneko-lua-language-server
|
||||||
pyright
|
pyright
|
||||||
rnix-lsp
|
rnix-lsp
|
||||||
|
|
||||||
|
# Formatters...
|
||||||
|
stylua # ...for Lua.
|
||||||
|
black # ...for Python.
|
||||||
|
nixpkgs-fmt # ...for Nix.
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
11
treefmt.toml
Normal file
11
treefmt.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[formatter.lua]
|
||||||
|
command = "stylua"
|
||||||
|
includes = [ "*.lua" ]
|
||||||
|
|
||||||
|
[formatter.nix]
|
||||||
|
command = "nixpkgs-fmt"
|
||||||
|
includes = [ "*.nix" ]
|
||||||
|
|
||||||
|
[formatter.python]
|
||||||
|
command = "black"
|
||||||
|
includes = [ "*.py" ]
|
Loading…
Reference in New Issue
Block a user