-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
I don't know which formatter this is running, but it is what happens when I run M-x nix-format-buffer in emacs. Test Plan: nix develop
This seems to be using nixfmt instead of nixpkgs-fmt. Do you have any particular preference in the output? I lean towards nixpkgs-fmt personally (the line breaks feel a bit awkward imo) We could add a formatter thatd be invoked consistently by |
pushed a commit to use nixpkg-fmt instead. Also I wasted like 15min trying to get format working cleanly in flake.nix (ie with a map over default systems), and I ended up polishing a turd. So I just ignored that and manually ran nixpkg-fmt. |
Huh its still different, even though rnix-lsp supposedly runs nixpkgs-fmt 🤔 im gonna have to look into that |
Maybe I am using a different version of nixpkgs-fmt? |
Yup, looks like rnix-lsp is still on 1.2.0. I agree with lilyball that I prefer the output from 1.2.0, but alas 😅 |
Assuming all nix files are formatted with nixpkgs-fmt 1.3.0, then Im cool with merging this. I can sort out lsp using the wrong formatter on my own end |
@Strum355 I under-engineered supporting nix fmt. Approve? :) |
Already ahead of you :smugcat: https://github.com/sourcegraph/sourcegraph/pull/51409 |
I don't know which formatter this is running, but it is what happens when I run M-x nix-format-buffer in emacs.
Test Plan: nix develop