mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
docs: simplify readme
This commit is contained in:
parent
a10a15984a
commit
2d540ec84b
4 changed files with 47 additions and 27 deletions
30
README.md
30
README.md
|
@ -95,33 +95,9 @@
|
||||||
We integrate with common code editors and workflows:
|
We integrate with common code editors and workflows:
|
||||||
|
|
||||||
- [Alejandra extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=kamadorueda.alejandra)
|
- [Alejandra extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=kamadorueda.alejandra)
|
||||||
- [Doom-emacs](https://github.com/hlissner/doom-emacs):
|
- [Doom-emacs](./integrations/doom-emacs/README.md)
|
||||||
|
- [Pre-commit](./integrations/pre-commit/README.md)
|
||||||
```
|
- [pre-commit-hooks.nix](./integrations/pre-commit-hooks-nix/README.md)
|
||||||
(set-formatter! 'alejandra "alejandra --quiet" :modes '(nix-mode))
|
|
||||||
```
|
|
||||||
|
|
||||||
- [Pre-commit](https://pre-commit.com/):
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
repos:
|
|
||||||
- repo: https://github.com/kamadorueda/alejandra
|
|
||||||
rev: 1.4.0
|
|
||||||
hooks:
|
|
||||||
# Choose one of the following:
|
|
||||||
- id: alejandra # Requires Nix to be previously installed in the system
|
|
||||||
- id: alejandra-system # Requires Alejandra to be previously installed in the system
|
|
||||||
```
|
|
||||||
|
|
||||||
- [pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix)
|
|
||||||
|
|
||||||
```nix
|
|
||||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
|
||||||
hooks = {
|
|
||||||
alejandra.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
|
|
9
integrations/doom-emacs/README.md
Normal file
9
integrations/doom-emacs/README.md
Normal 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))
|
||||||
|
```
|
15
integrations/pre-commit-hooks-nix/README.md
Normal file
15
integrations/pre-commit-hooks-nix/README.md
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
20
integrations/pre-commit/README.md
Normal file
20
integrations/pre-commit/README.md
Normal 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
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue