Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Alejandra 💅New to Visual Studio Code? Get it now.
Alejandra 💅

Alejandra 💅

Kevin Amado

|
5,733 installs
| (1) | Free
The Uncompromising Nix Code Formatter
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Alejandra 💅

The Uncompromising Nix Code Formatter

Features

This extension adds built-in editor support for formatting Nix files automatically with Alejandra.

Getting started

  1. Make sure to install Alejandra in your system first as explained here.

  2. Install the vscode extension and reload the window (just close and open again).

  3. Open a Nix file, do a right click and you should be able to see "Format Document" in the menu.

    Alternatively, it will be formatted automatically when you save the file.

Enjoy!

Troubleshooting

If you encounter a problem please let us know in the issues section.

The most probable causes of failure are:

  • Not having Alejandra installed in your system.

    In this case please follow the instructions here.

  • A misconfiguration.

    In this case please make sure that your config contains the following values:

    {
      "[nix]": {
        "editor.defaultFormatter": "kamadorueda.alejandra",
        "editor.formatOnPaste": true,
        "editor.formatOnSave": true,
        "editor.formatOnType": false
      },
      "alejandra.program": "alejandra"
    }
    
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft