Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nil vs nixd #111

Open
srghma opened this issue Oct 27, 2023 · 1 comment
Open

nil vs nixd #111

srghma opened this issue Oct 27, 2023 · 1 comment
Labels
C-support Catagory: support questions

Comments

@srghma
Copy link

srghma commented Oct 27, 2023

hi, i'm new here

they both provide language server for nix

  1. what is the difference?
  2. which should I use?
  3. I see nil can be used as pre-commit-hook using https://github.com/cachix/pre-commit-hooks.nix (to do....what?), but nixd - can?

TODO: add this info into readme?

@TLATER
Copy link

TLATER commented Nov 17, 2023

  1. nixd actually evaluates the code, which makes it very flexible for a wide variety of projects you can do with nix, but makes it pretty configuration heavy, since you need to teach it how to evaluate your project.

    nil on the other hand is very configuration-light, working perfectly out of the box most of the time, but when your project uses e.g. home-manger won't give you any option completion for that.

  2. Both projects are independently useful, I usually use nil because I can't be bothered to configure nixd for every little project, but I can imagine myself configuring nixd for a specific project at some point in the future to get more specific diagnostics.

  3. https://github.com/oxalica/nil/blob/main/docs/features.md#cli-features
    nixd doesn't support anything like this, it's purely a language server, but you can get the same result with a clever nix eval so you don't really need explicit support for it from nixd.

I'm not sure this should be added to the readme, most of this info is pretty easy to get if you just read both projects' readmes with a bit of background knowledge, or just try them out. Pretty standard for evaluating tools really.

It's also not really nil's job to document nixd, and any such documentation will just drift as nixd changes, without being able to be reflected in nil's readme without making commits just to update the readme (which really is just an unnecessary maintenance burden for nil).

@oxalica oxalica added the C-support Catagory: support questions label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-support Catagory: support questions
Projects
None yet
Development

No branches or pull requests

3 participants