Hello hello
I have the Nix IDE extension on VSCode.
I’m getting the following error whenever I save, any idea how I could investigate this?
Failed to run nixpkgs-fmt: spawn nixpkgs-fmt ENOENT
Hello hello
I have the Nix IDE extension on VSCode.
I’m getting the following error whenever I save, any idea how I could investigate this?
Failed to run nixpkgs-fmt: spawn nixpkgs-fmt ENOENT
It means you don’t have the nixpkgs-fmt package installed.
Vscode will by default use it to format your code whenever you save. Either disable that feature or install the package.
Install the package with brew you mean?
Ideally with nix from the nixpkgs channel like @TLATER linked, but as long as you have a nixpkgs-fmt
binary on your $PATH it should work fine, no matter how you got this package, but I’m not sure if it’s available in homebrew
I use neither vscode nor mac os, but I hear this package works well with vscode if you want to use nix shells to provide your development packages instead: Nix Environment Selector - Visual Studio Marketplace
You could also use home-manager: Home Manager Manual.
Or indeed, just get your hands on a copy of the binary and dump it in a directory in $PATH
.
Lots of ways to do it