chore: add treefmt

This commit is contained in:
Youwen Wu 2024-12-28 23:28:46 -08:00
parent 9d58b073f3
commit 2700d47c01
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 21 additions and 1 deletions

View file

@ -237,10 +237,17 @@
devShells = { devShells = {
default = pkgs.mkShell { default = pkgs.mkShell {
name = defaultPackageName; name = defaultPackageName;
packages = [ defaultPackage ] ++ (with pkgs; [ lua-language-server ]); packages =
[ defaultPackage ]
++ (with pkgs; [
lua-language-server
nixfmt-rfc-style
stylua
]);
}; };
}; };
formatter = pkgs.treefmt;
} }
) )
// { // {

13
treefmt.toml Normal file
View file

@ -0,0 +1,13 @@
excludes = ["flake.lock", ".gitignore", "README.md"]
[formatter.stylua]
command = "stylua"
excludes = []
includes = ["*.lua"]
options = []
[formatter.nixfmt-rfc-style]
command = "nixfmt"
excludes = []
includes = ["*.nix"]
options = []