File tree 4 files changed +47
-27
lines changed
4 files changed +47
-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
+ just use the following:
6
+
7
+ ``` lisp
8
+ (set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
9
+ ```
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 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
+ ```
Original file line number Diff line number Diff line change
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
+ ` ` `
You can’t perform that action at this time.
0 commit comments