Mdformat plugin to format Nix code blocks with alejandra
mdformat-nix-alejandra is an mdformat plugin that makes mdformat format Nix code blocks with alejandra. The plugin invokes alejandra in a subprocess so having it installed is a requirement.
To make the most of this repository, you should have the following installed:
After cloning this repository and entering inside, run direnv allow
when prompted, and you will be met with following prompt.
🔨 Welcome to mdformat-nix-alejandra
[Tools]
check - Checks the source tree
fmt - Format the source tree
[general commands]
menu - prints this menu
[python]
pytest - Invoke pytest directly
It will also load required dependencies like python
, poetry
, pytest
and alejandra
to quickly develop.
- Install alejandra
- Install mdformat-nix-alejandra
pip install mdformat-nix-alejandra
mdformat YOUR_MARKDOWN_FILE.md
This project is licensed under the MIT license. See the LICENSE file for more details.
If you encounter any issues or have any questions, please open an issue on the GitHub repository.
This code is practically based on mdformat-rustfmt plugin written by hukkin, so kudos to him.