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