mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
refactor: move actions from alejandra>nixpkgs-fmt
This commit is contained in:
parent
23cfb96adb
commit
2a08576697
2 changed files with 4 additions and 4 deletions
2
.github/workflows/flake-checks.yaml
vendored
2
.github/workflows/flake-checks.yaml
vendored
|
|
@ -19,4 +19,4 @@ jobs:
|
||||||
- name: Check for lints in .nix files
|
- name: Check for lints in .nix files
|
||||||
run: nix run nixpkgs#statix -- check
|
run: nix run nixpkgs#statix -- check
|
||||||
- name: Check formatting in .nix files
|
- name: Check formatting in .nix files
|
||||||
run: git ls-files '*.nix' | xargs nix run nixpkgs#alejandra -- --check
|
run: git ls-files '*.nix' | xargs nix run nixpkgs#nixpkgs-fmt -- --check
|
||||||
|
|
|
||||||
|
|
@ -7572,10 +7572,10 @@ This section handles everything that shoudld happen when I save =SwarselSystems.
|
||||||
We set a hook that runs everytime we save the file. It would be a bit more efficient to only export and format when we enter a magit window for instance (since especially the html export takes times), however, since I cannot be sure to only ever commit from magit (I do indeed sometimes use git from the command line), I prefer this approach.
|
We set a hook that runs everytime we save the file. It would be a bit more efficient to only export and format when we enter a magit window for instance (since especially the html export takes times), however, since I cannot be sure to only ever commit from magit (I do indeed sometimes use git from the command line), I prefer this approach.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun run-alejandra ()
|
(defun swarsel/run-formatting ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((default-directory (expand-file-name "~/.dotfiles")))
|
(let ((default-directory (expand-file-name "~/.dotfiles")))
|
||||||
(shell-command "alejandra . -q")))
|
(shell-command "nixpkgs-fmt . > /dev/null")))
|
||||||
|
|
||||||
(defun swarsel/org-babel-tangle-config ()
|
(defun swarsel/org-babel-tangle-config ()
|
||||||
(when (string-equal (buffer-file-name)
|
(when (string-equal (buffer-file-name)
|
||||||
|
|
@ -7584,7 +7584,7 @@ We set a hook that runs everytime we save the file. It would be a bit more effic
|
||||||
(let ((org-confirm-babel-evaluate nil))
|
(let ((org-confirm-babel-evaluate nil))
|
||||||
(org-html-export-to-html)
|
(org-html-export-to-html)
|
||||||
(org-babel-tangle)
|
(org-babel-tangle)
|
||||||
(run-alejandra))))
|
(swarsel/run-formatting))))
|
||||||
|
|
||||||
(setq org-html-htmlize-output-type nil)
|
(setq org-html-htmlize-output-type nil)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue