my nixos dotfiles :3 (git.koi.rip mirror)
git.koi.rip/koi/dotfiles
linux
dotfiles
neovim
nixos
catppuccin
1{
2 treefmt,
3 nixfmt,
4 js-beautify,
5 shfmt,
6 kdePackages,
7}:
8
9treefmt.withConfig {
10 runtimeInputs = [
11 nixfmt
12 js-beautify
13 shfmt
14 kdePackages.qtdeclarative
15 ];
16
17 settings = {
18 on-unmatched = "info";
19 tree-root-file = "flake.nix";
20
21 formatter = {
22 nixfmt = {
23 command = "nixfmt";
24 includes = [ "*.nix" ];
25 };
26
27 js-beautify = {
28 command = "js-beautify";
29 options = [
30 "--replace"
31 "--editorconfig"
32 "--jslint-happy"
33 "--max-preserve-newlines"
34 "2"
35 ];
36 includes = [
37 "*.js"
38 "*.mjs"
39 "*.css"
40 ];
41 };
42
43 shfmt = {
44 command = "shfmt";
45 options = [ "-w" ];
46 includes = [
47 "*.sh"
48 "*.bash"
49 # "*.zsh" # https://github.com/mvdan/sh/issues/120
50 ];
51 };
52
53 qmlformat = {
54 command = "qmlformat";
55 options = [
56 "--inplace"
57 "--sort-imports"
58 "--indent-width"
59 "2"
60 ];
61 includes = [ "*.qml" ];
62 };
63 };
64 };
65}