mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-01-30 22:57:54 +00:00
project: add codebase formatter
This commit is contained in:
parent
df62314031
commit
95da682a64
@ -8,8 +8,13 @@
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
let systems = inputs.flake-utils.lib.defaultSystems;
|
||||
in inputs.flake-utils.lib.eachSystem systems (system: {
|
||||
in inputs.flake-utils.lib.eachSystem systems (system: let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
{
|
||||
devShell =
|
||||
import ./shell.nix { pkgs = import nixpkgs { inherit system; }; };
|
||||
import ./shell.nix { inherit pkgs; };
|
||||
|
||||
formatter = pkgs.treefmt;
|
||||
});
|
||||
}
|
||||
|
12
shell.nix
12
shell.nix
@ -16,7 +16,17 @@ with pkgs;
|
||||
mkShell {
|
||||
packages = [
|
||||
python3
|
||||
pyright
|
||||
stow
|
||||
|
||||
# Language servers for...
|
||||
lua-language-server # ...Lua.
|
||||
pyright # ...Python.
|
||||
rnix-lsp # ...Nix.
|
||||
|
||||
# Formatters for...
|
||||
treefmt # ...everything under the sun.
|
||||
stylua # ...Lua.
|
||||
nixpkgs-fmt # ...Nix.
|
||||
black # ...Python.
|
||||
];
|
||||
}
|
||||
|
3
treefmt.toml
Normal file
3
treefmt.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[formatter.lua]
|
||||
command = "stylua"
|
||||
includes = [ "*.lua" ]
|
Loading…
Reference in New Issue
Block a user