Skip to content

Nix (nixd language server)#

Server#

For more information about the LSP server, check nixd.

Installation#

nix profile install github:nixos/nixpkgs#nixd

Debugger: Not available#

Available configurations#

lsp-nix-nixd-formatting-command#

Type: lsp-string-vector

Default: nil

External formatter command with arguments.

Example: ["nixpkgs-fmt"]


lsp-nix-nixd-home-manager-options-expr#

Type: string

Default: nil

Option set for home-manager option completion.

Example: "(builtins.getFlake "/home/nb/nix").homeConfigurations."nb@mnd".options"


lsp-nix-nixd-nixos-options-expr#

Type: string

Default: nil

Option set for NixOS option completion. If this is omitted, the default search path (<nixpkgs>) will be used.

Example: "(builtins.getFlake "/home/nb/nix").nixosConfigurations.mnd.options"


lsp-nix-nixd-nixpkgs-expr#

Type: string

Default: nil

This expression will be interpreted as "nixpkgs" toplevel Nixd provides package, lib completion/information from it.

Resource Usage: Entries are lazily evaluated, entire nixpkgs takes 200~300MB for just "names". Package documentation, versions, are evaluated by-need.

Example: "import <nixpkgs> { }"


lsp-nix-nixd-server-path#

Type: string

Default: nixd

Executable path for the server.



Last update: November 19, 2024