Visitar URL original
Nix Plugin - dprint - Code Formatter
// plugins

Nix

nixfmt-rs (Nix) wrapper plugin.

Wrapper plugin that formats Nix code via nixfmt-rs, a Rust port of nixfmt.

Formats .nix files.

This plugin is updated after upstream nixfmt and nixfmt-rs, so its output can lag behind the latest nixfmt. We recommend against using it for nixpkgs or other NixOS organization contributions.

Install and Setup

In your project's directory with a dprint.json file, run:

dprint add nix

This will update your config file to have an entry for the plugin. Then optionally specify a "nix" property to add configuration:

{
  "nix": {
    // nix config goes here
  },
  "plugins": [
    "npm:@dprint/nix@0.2.0"
  ]
}

All plugins

Official Plugins

Community Plugins

Wrapper Plugins

Everything Else