Skip to content

Commit 2d540ec

Browse files
committed
docs: simplify readme
1 parent a10a159 commit 2d540ec

File tree

4 files changed

+47
-27
lines changed

4 files changed

+47
-27
lines changed

README.md

+3-27
Original file line numberDiff line numberDiff line change
@@ -95,33 +95,9 @@
9595
We integrate with common code editors and workflows:
9696

9797
- [Alejandra extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=kamadorueda.alejandra)
98-
- [Doom-emacs](https://github.com/hlissner/doom-emacs):
99-
100-
```
101-
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
102-
```
103-
104-
- [Pre-commit](https://pre-commit.com/):
105-
106-
```yaml
107-
repos:
108-
- repo: https://github.com/kamadorueda/alejandra
109-
rev: 1.4.0
110-
hooks:
111-
# Choose one of the following:
112-
- id: alejandra # Requires Nix to be previously installed in the system
113-
- id: alejandra-system # Requires Alejandra to be previously installed in the system
114-
```
115-
116-
- [pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix)
117-
118-
```nix
119-
pre-commit-check = pre-commit-hooks.lib.${system}.run {
120-
hooks = {
121-
alejandra.enable = true;
122-
};
123-
};
124-
```
98+
- [Doom-emacs](./integrations/doom-emacs/README.md)
99+
- [Pre-commit](./integrations/pre-commit/README.md)
100+
- [pre-commit-hooks.nix](./integrations/pre-commit-hooks-nix/README.md)
125101

126102
## Getting started
127103

integrations/doom-emacs/README.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Doom-Emacs integration
2+
3+
In order to configure Alejandra in
4+
[Doom-emacs](https://github.com/hlissner/doom-emacs)
5+
just use the following:
6+
7+
```lisp
8+
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
9+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Pre-commit-hooks.nix integration
2+
3+
In order to use Alejandra with
4+
[pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix)
5+
use a configuration file like the following:
6+
7+
```nix
8+
{
9+
pre-commit-check = pre-commit-hooks.lib.${system}.run {
10+
hooks = {
11+
alejandra.enable = true;
12+
};
13+
};
14+
}
15+
```

integrations/pre-commit/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Pre-Commit integration
2+
3+
In order to use Alejandra with
4+
[Pre-Commit](https://pre-commit.com/)
5+
just create a file named `.pre-commit-config.yaml`
6+
with contents:
7+
8+
```yaml
9+
repos:
10+
- repo: https://github.com/kamadorueda/alejandra
11+
rev: 1.4.0
12+
# Choose either the 'alejandra' or 'alejandra-system' hook
13+
# depending on what pre-requisites you have:
14+
hooks:
15+
# Requires Nix to be previously installed in the system
16+
- id: alejandra
17+
18+
# Requires Alejandra to be previously installed in the system
19+
- id: alejandra-system
20+
```

0 commit comments

Comments
 (0)