diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0ce7ddc0 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,12 @@ +{ + "plugins": ["/nix/store/6kfm5qrd2bckffxphb5ylvbg3sz1657r-prettier-plugin-go-template-0.0.15-unstable-2023-07-26/lib/node_modules/prettier-plugin-go-template/lib/index.js"], + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template", + "useTabs": true, + }, + }, + ], +} diff --git a/flake.nix b/flake.nix index ed2819ba..c907b2ee 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,8 @@ pkgs.goose pkgs.gotools pkgs.lefthook + pkgs.prettier + pkgs.prettier-plugin-go-template pkgs.watchexec ]; }; diff --git a/lefthook.yml b/lefthook.yml index 003fb93d..b34ad656 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -12,3 +12,7 @@ pre-commit: glob: "*.go" run: gofmt -w {staged_files} stage_fixed: true + htmlfmt: + glob: "*.html" + run: prettier -w {staged_files} + stage_fixed: true diff --git a/rmo/template/base.html b/rmo/template/base.html index 0b8cd7ad..327dc56c 100644 --- a/rmo/template/base.html +++ b/rmo/template/base.html @@ -1,36 +1,42 @@ - + -
- - -