Skip to content

[BUG] Statix does not start #3296

Open
Open
@ithinuel

Description

@ithinuel
Field Description
Plugin statix
Nixpkgs nixos-24.11
Home Manager release-24.11
  • I have read the FAQ and my bug is not listed there.

Description

Provided my understanding is correct, the MRE in the next section should be enough to enable the server.
It seems to be enough as it shows in :LspInfo. However an error message appears in the status line

Client statix quit with exit code 2 and signal 0. Check log for errors: /home/<user>/.local/state/nvim/lsp.log

The relevant part of the log reads:

[ERROR][2025-05-07 21:47:33] .../vim/lsp/rpc.lua:770	"rpc"	"/nix/store/pbwgjxamg2l4pvn278k9i99jqbr8nx75-statix-0.5.8/bin/statix"	"stderr"	"statix 0.5.8\n\nAkshay <nerdy@peppe.rs>\n\nLints and suggestions for the Nix programming language\n\nUSAGE:\n    statix <SUBCOMMAND>\n\nOPTIONS:\n    -h, --help       Print help information\n    -V, --version    Print version information\n\nSUBCOMMANDS:\n    check      Lints and suggestions for the nix programming language\n    dump       Dump a sample config to stdout\n    explain    Print detailed explanation for a lint warning\n    fix        Find and fix issues raised by statix-check\n    help       Print this message or the help of the given subcommand(s)\n    list       List all available lints\n    single     Fix exactly one issue at provided position\n"

It seems like statix is being started without any argument. However, this is doesn’t align with what’s configured in lspconfig-servers.json where it’s defined as:

{
  "cmd": ["statix", "check", "--stdin"],
  "desc": "https://github.com/nerdypepper/statix\n\nlints and suggestions for the nix programming language\n    ",
  "name": "statix"
}

From what I can make out, plugins/lsp/language-servers/default.nix#L198-L199 should likely include the cmd attribute from the json file as well.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
  lsp = {
    enable = true;
    servers.statix.enable = true;
  };
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions