Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akirak/nix-fmt.el
(WIP) An Emacs frontend to `nix fmt` command; An Emacs companion to treefmt-nix
https://github.com/akirak/nix-fmt.el
Last synced: 7 days ago
JSON representation
(WIP) An Emacs frontend to `nix fmt` command; An Emacs companion to treefmt-nix
- Host: GitHub
- URL: https://github.com/akirak/nix-fmt.el
- Owner: akirak
- License: gpl-3.0
- Created: 2023-10-14T04:25:32.000Z (about 1 year ago)
- Default Branch: develop
- Last Pushed: 2023-10-15T12:01:39.000Z (about 1 year ago)
- Last Synced: 2024-04-24T03:05:46.518Z (7 months ago)
- Language: Emacs Lisp
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* nix-fmt.el
~nix-fmt.el~ is an Emacs frontend to ~nix fmt~ command.
It is an alternative to [[https://github.com/purcell/emacs-reformatter][reformatter.el]] and [[https://github.com/radian-software/apheleia][apheleia]], but it is specific to ~nix fmt~ which is configured in the ~formatter~ attribute of each flake.Especially when combined with [[https://github.com/numtide/treefmt-nix][treefmt-nix]], ~nix fmt~ is a convenient tool that can be used to format code of any language in the repository.
However, it also means that ~nix fmt~ can run any program configured by the author of the flake, which is potentially dangerous.
Thus you need to explicitly approve the formatter configuration of every project you work on, as you do with [[https://direnv.net/][direnv]].
The focus of ~nix-fmt.el~ is to integrate the approval workflow into Emacs.
If you automatically reformat code with ~treefmt-nix~, you have to approve the configuration before you save any code.This project is currently work in progress, so the approval workflow is not completely implemented yet.