1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-30 12:07:46 +00:00

docs: simplify readme

This commit is contained in:
Kevin Amado 2022-06-13 12:37:28 -06:00
parent a10a15984a
commit 2d540ec84b
4 changed files with 47 additions and 27 deletions

View file

@ -0,0 +1,9 @@
# Doom-Emacs integration
In order to configure Alejandra in
[Doom-emacs](https://github.com/hlissner/doom-emacs)
just use the following:
```lisp
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
```

View file

@ -0,0 +1,15 @@
# Pre-commit-hooks.nix integration
In order to use Alejandra with
[pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix)
use a configuration file like the following:
```nix
{
pre-commit-check = pre-commit-hooks.lib.${system}.run {
hooks = {
alejandra.enable = true;
};
};
}
```

View file

@ -0,0 +1,20 @@
# Pre-Commit integration
In order to use Alejandra with
[Pre-Commit](https://pre-commit.com/)
just create a file named `.pre-commit-config.yaml`
with contents:
```yaml
repos:
- repo: https://github.com/kamadorueda/alejandra
rev: 1.4.0
# Choose either the 'alejandra' or 'alejandra-system' hook
# depending on what pre-requisites you have:
hooks:
# Requires Nix to be previously installed in the system
- id: alejandra
# Requires Alejandra to be previously installed in the system
- id: alejandra-system
```