Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 3, 2025
1 parent d60cc51 commit 1c0a425
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 117 deletions.
95 changes: 74 additions & 21 deletions flake-modules/dev/treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,97 @@
lib.optionalAttrs (inputs.treefmt-nix ? flakeModule) {
treefmt.config = {
projectRootFile = "flake.nix";
flakeCheck = true;

programs = {
actionlint.enable = true;
biome = {
enable = true;
settings.formatter.formatWithErrors = true;
};
clang-format.enable = true;
isort.enable = true;
nixfmt = {
deadnix = {
enable = true;
package = pkgs.nixfmt-rfc-style;
};
prettier = {
deno = {
enable = true;

excludes = [ "**.md" ];
# Using biome for these
excludes = [
"*.ts"
"*.js"
"*.json"
"*.jsonc"
];
};
ruff = {
check = true;
format = true;
fantomas.enable = true;
fish_indent.enable = true;
gofmt.enable = true;
isort.enable = true;
nixfmt.enable = true;
nufmt.enable = true;
ruff-check.enable = true;
ruff-format.enable = true;
rustfmt.enable = true;
shfmt = {
enable = true;
indent_size = 4;
};
statix.enable = true;
stylua.enable = true;
shfmt.enable = true;
taplo.enable = true;
yamlfmt.enable = true;
};

settings = {
global.excludes = [
".editorconfig"
".envrc"
".git-blame-ignore-revs"
".gitignore"
"LICENSE"
"flake.lock"
"**.md"
"**.scm"
"**.svg"
"**/man/*.5"
"*.editorconfig"
"*.envrc"
"*.gitconfig"
"*.git-blame-ignore-revs"
"*.gitignore"
"*.gitattributes"
"*.luacheckrc"
"*CODEOWNERS"
"*LICENSE"
"*flake.lock"
"*.svg"
"*.png"
"*.gif"
"*.ico"
# TODO: formatters?
"*Makefile"
"*makefile"
"*.xml"
"*.zsh"
"*.rasi"
"*.kdl"

# TODO: exceptions
# WARN no formatter for path: homes/x86_64-linux/nixos@CORE-PW00LM92/git/windows-compat-config
# WARN no formatter for path: modules/darwin/desktop/wms/yabai/extraConfig
# WARN no formatter for path: modules/home/programs/graphical/addons/electron-support/electron-flags.conf
# WARN no formatter for path: modules/home/programs/graphical/addons/kanshi/config
# WARN no formatter for path: modules/home/programs/graphical/addons/mako/config
# WARN no formatter for path: modules/home/programs/graphical/addons/swappy/config
# WARN no formatter for path: modules/home/programs/graphical/bars/sketchybar/dynamic-island-sketchybar/helper/islandhelper
# WARN no formatter for path: modules/home/programs/graphical/bars/sketchybar/dynamic-island-sketchybar/scripts/islands/music/cava.conf
# WARN no formatter for path: modules/home/programs/graphical/bars/sketchybar/dynamic-island-sketchybar/scripts/islands/music/get_artwork.scpt
# WARN no formatter for path: modules/home/programs/graphical/bars/sketchybar/dynamic-island-sketchybar/scripts/islands/volume/data/cache
# WARN no formatter for path: modules/home/programs/graphical/bars/sketchybar/dynamic-island-sketchybar/sketchybarrc
# WARN no formatter for path: modules/home/programs/graphical/launchers/wofi/config
# WARN no formatter for path: modules/home/programs/terminal/editors/micro/catppuccin-macchiato.micro
# WARN no formatter for path: modules/home/programs/terminal/tools/tmux/config/general.tmux
# WARN no formatter for path: modules/home/theme/qt/Kvantum/Catppuccin-Macchiato-Blue/Catppuccin-Macchiato-Blue.kvconfig
# WARN no formatter for path: modules/home/theme/qt/Kvantum/kvantum.kvconfig
# WARN no formatter for path: modules/nixos/programs/graphical/addons/looking-glass-client/client.ini
# WARN no formatter for path: systems/x86_64-linux/khanelinix/hyprlandOutput
# WARN no formatter for path: systems/x86_64-linux/khanelinix/swayOutput
# WARN no formatter for path: templates/c/Makefile.in
# WARN no formatter for path: templates/c/configure.ac
# WARN no formatter for path: templates/dotnetf/HelloWorld.Test/HelloWorld.Test.fsproj
# WARN no formatter for path: templates/dotnetf/HelloWorld.sln
# WARN no formatter for path: templates/dotnetf/HelloWorld/HelloWorld.fsproj
];

formatter.ruff-format.options = [ "--isolated" ];
};
};
Expand Down
96 changes: 0 additions & 96 deletions treefmt.nix

This file was deleted.

0 comments on commit 1c0a425

Please sign in to comment.