Skip to content

Latest commit

 

History

History
93 lines (50 loc) · 2.34 KB

README.md

File metadata and controls

93 lines (50 loc) · 2.34 KB

nixd

Nix language server

Note: This server is working in progress!

Status page: nix-community#49

Please join our matrix room (https://matrix.to/#/#nixd:matrix.org) for internal testing & feedback.

About

This is a Nix language server that directly uses (i.e., is linked with) the official Nix library (https://github.com/NixOS/nix).

Some notable features provided by linking with the Nix library include:

  • Diagnostics and evaluation that produce identical results as the real Nix command.
  • Shared eval caches (flake, file) with your system's Nix.
  • Native support for cross-file analysis.
  • Precise Nix language support. We do not maintain "yet another parser & evaluator".
  • Support for built-ins, including Nix plugins.

Features Preview

Write a package using nixd

package

Native cross-file analysis

package

Handle evaluations exactly same as nix evaluator

infinte-recursion

Support *all* builtins

eval-builtin-json

And diagnostic:

eval-builtin-diagnostic

Eval nixpkgs

eval-nixpkgs

Print internal AST Node type, and evalution result just as same as nix repl

eval-ast

Complete dynamic envs, like `with` expression

complete-with

Resources

Tooling

We provide some extra tools based on our codebase.

nix-ast-dump

Used for dumping internal data structures in nix parser.

Demo: all-grammar.nix