README.md

nil-lsp #

Nix language server for Claude Code, providing code intelligence and analysis via nil.

Supported Extensions #

  • .nix

How it connects #

Claude Code runs nil as an LSP server over stdio. .nix files are routed to it with language ID nix.

Overlap with nixd-lsp #

nil and nixd both serve .nix. Same file type, different focus: nil is faster on large files, nixd understands NixOS/home-manager modules and flake outputs. Running both at once means duplicate diagnostics, so pick one.

Installation #

nix profile install nixpkgs#nil

Via nix-env #

nix-env -iA nixpkgs.nil

Requirements #

  • Nix package manager
  • nil binary in PATH

More Information #