Fork of zed-extensions/nix
  • Tree-sitter Query 69%
  • Rust 31%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
zed-zippy[bot] b43be394a6
Update CI workflows to 3183c04 (#57)
This PR updates the CI workflow files from the main Zed repository
based on the commit
zed-industries/zed@3183c04515

The update includes a new version of the extension CLI which adds
validation for semantic token rules for languages

Co-authored-by: zed-zippy[bot] <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-03-25 18:55:12 +00:00
.github/workflows Update CI workflows to 3183c04 (#57) 2026-03-25 18:55:12 +00:00
.zed Only apply hard_tabs setting to Nix (#37) 2025-10-28 11:29:51 +01:00
languages/nix Add comment language injections (#42) 2026-02-02 21:37:58 +01:00
src chore: Run cargo clippy --fix (#45) 2026-01-04 18:46:44 +00:00
.gitignore Add Nix language server support (#6) 2024-07-05 16:38:16 -04:00
Cargo.lock Bump version to 0.1.4 (#47) 2026-02-02 21:40:09 +01:00
Cargo.toml Bump version to 0.1.4 (#47) 2026-02-02 21:40:09 +01:00
extension.toml Bump version to 0.1.4 (#47) 2026-02-02 21:40:09 +01:00
LICENSE Initial commit 2024-02-29 21:13:38 -08:00
README.md Add formatters in the README.md (#21) 2025-01-01 10:42:17 -05:00

Nix

Nix language support in Zed

Configuration

Various options can be configured via Zed settings.json files.

Configure Nixd

{
  "lsp": {
    "nixd": {
      "settings": {
        "diagnostic": {
          "suppress": [ "sema-extra-with" ]
        }
      }
    }
  }
}

See: Nixd LSP Configuration Docs for more options.

Configure Nil

{
  "lsp": {
    "nil": {
      "settings": {
         "diagnostics": {
          "ignored": [ "unused_binding" ]
        }
      }
    }
  }
}

See: Nil LSP Configuration Docs for more options.

Only use Nixd

{
  "languages": {
    "Nix": {
      "language_servers": [ "nixd", "!nil" ]
    }
  }
}

Only use Nil

{
  "languages": {
    "Nix": {
      "language_servers": [ "nil", "!nixd" ]
    }
  }
}

Configure formatters

You can configure formatters through LSP:

{
  "lsp": {
    "nil": {    // or "nixd":
      "initialization_options": {
        "formatting": {
          "command": ["alejandra", "--quiet", "--"]  // or ["nixfmt"]
        }
      }
    }
  }
}

Or through Zed itself:

{
  "languages": {
    "Nix": {
      "formatter": {
        "external": {
          "command": "alejandra",  // or "nixfmt"
          "arguments": ["--quiet", "--"]
        }
      }
    }
  }
}