Goal (user's words): the equivalent of bacon for Rust but for Nix — a running "compiler" that evaluates and jumps to source in real time without leaving the editor, plus fuzzy find for variables and their documentation. Current best tool is standalone nix run github:bluskript/nix-inspect.
Researched state of the art (2025–2026). Summary + prioritized plan:
The core: nixd over nil
nixd links against real Nix libexpr, so it actually evaluates: real evaluation-error diagnostics, cross-file go-to-definition that jumps into nixpkgs source, and evaluation-driven completion including NixOS/Home-Manager option completion. nil is lighter/zero-config but static-only. For "evaluate + jump to source in real time," nixd is the pick.
The load-bearing config is pointing nixd at the flake:
Use builtins.toString ./. so it follows the opened project; test each expr in nix repl first; expect a first-call stall (lazy eval) and a broken flake.nix to silently disable option completion.
The "bacon for Nix" loop (honest: no dedicated tool exists)
- nixd diagnostics are already a partial running-compiler (live errors).
- For live values: a
watchexec -e nix -- nix eval .#… --json (or a bacon custom job) in a toggleterm split. No mature Neovim plugin evaluates an expression under the cursor and shows the value inline — this is the one genuine gap.
Fuzzy variables + docs
manix wrapped in a Telescope picker (nixpkgs functions + NixOS and HM options + builtins) — highest-leverage single addition.
noogle for function search by name/type signature.
- Telescope LSP pickers (
lsp_dynamic_workspace_symbols, lsp_document_symbols, definitions/references) on top of nixd.
- Keep
nix-inspect as a bound TUI companion (<leader>ni), no editor integration expected.
Prioritized checklist
Sources: nix-community/nixd (docs/configuration.md), oxalica/nil, mlvzk/manix, noogle.dev, lf-/nix-doc, Canop/bacon, bluskript/nix-inspect, NixOS/nix-eval-jobs.
Goal (user's words): the equivalent of
baconfor Rust but for Nix — a running "compiler" that evaluates and jumps to source in real time without leaving the editor, plus fuzzy find for variables and their documentation. Current best tool is standalonenix run github:bluskript/nix-inspect.Researched state of the art (2025–2026). Summary + prioritized plan:
The core:
nixdovernilnixdlinks against real Nix libexpr, so it actually evaluates: real evaluation-error diagnostics, cross-file go-to-definition that jumps into nixpkgs source, and evaluation-driven completion including NixOS/Home-Manager option completion.nilis lighter/zero-config but static-only. For "evaluate + jump to source in real time," nixd is the pick.The load-bearing config is pointing nixd at the flake:
Use
builtins.toString ./.so it follows the opened project; test each expr innix replfirst; expect a first-call stall (lazy eval) and a brokenflake.nixto silently disable option completion.The "bacon for Nix" loop (honest: no dedicated tool exists)
watchexec -e nix -- nix eval .#… --json(or abaconcustom job) in atoggletermsplit. No mature Neovim plugin evaluates an expression under the cursor and shows the value inline — this is the one genuine gap.Fuzzy variables + docs
manixwrapped in a Telescope picker (nixpkgs functions + NixOS and HM options + builtins) — highest-leverage single addition.nooglefor function search by name/type signature.lsp_dynamic_workspace_symbols,lsp_document_symbols, definitions/references) on top of nixd.nix-inspectas a bound TUI companion (<leader>ni), no editor integration expected.Prioritized checklist
nixdas the Nix LSP (nixvimplugins.lsp.servers.nixd); disable/relegatenil.toggleterm+ keymap for awatchexec/baconnix evalwatch split (live values).manixTelescope picker for option/function doc search (<leader>fn).nixfmt-rfc-styleto match dotfiles pre-commit.nix-inspectto open in a terminal split;noogleshortcut; optionalnix-docctags fallback.nixpkgs,options.nixos,options.home_manager) per above.Sources: nix-community/nixd (docs/configuration.md), oxalica/nil, mlvzk/manix, noogle.dev, lf-/nix-doc, Canop/bacon, bluskript/nix-inspect, NixOS/nix-eval-jobs.