File tree 4 files changed +49
-27
lines changed
4 files changed +49
-27
lines changed Original file line number Diff line number Diff line change 95
95
We integrate with common code editors and workflows:
96
96
97
97
- [ 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 )
125
101
126
102
## Getting started
127
103
Original file line number Diff line number Diff line change
1
+ # Doom-Emacs integration
2
+
3
+ In order to configure Alejandra in
4
+ [ Doom-emacs] ( https://github.com/hlissner/doom-emacs ) :
5
+
6
+ Just use the following:
7
+
8
+ ``` lisp
9
+ (set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
10
+ ```
Original file line number Diff line number Diff line change
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 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
+ ```
Original file line number Diff line number Diff line change
1
+ # Pre-Commit integration
2
+
3
+ In order to configure Alejandra in
4
+ [ Pre-Commit] ( https://pre-commit.com/ ) ,
5
+
6
+ First create a file named ` .pre-commit-config.yaml ` ,
7
+ with contents:
8
+
9
+ ``` yaml
10
+ repos :
11
+ - repo : https://github.com/kamadorueda/alejandra
12
+ rev : 1.4.0
13
+ # Choose either the 'alejandra' or 'alejandra-system' hook
14
+ # depending on what pre-requisites you have:
15
+ hooks :
16
+ # Requires Nix to be previously installed in the system
17
+ - id : alejandra
18
+
19
+ # Requires Alejandra to be previously installed in the system
20
+ - id : alejandra-system
21
+ ` ` `
You can’t perform that action at this time.
0 commit comments