From 9ba71d5b6285bad96ae55c76b6ed749072220184 Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Thu, 30 Jul 2020 22:05:36 -0600 Subject: [PATCH] replace nixfmt with nixpkgs-fmt nixpkgs-fmt looks like it is going to be the standard formatter for nixpkgs, so we should follow suite. --- CONTRIBUTING.md | 4 ++-- profiles/develop/kakoune/default.nix | 2 +- profiles/develop/kakoune/lint/nix.kak | 2 +- profiles/develop/kakoune/lint/nix.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0629388..708b368 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,11 +6,11 @@ the `template` branch to provide a host of useful NixOS configurations available "out of the box". If you wish to contribute such an expression please follow these guidelines: -* format your code with [`nixfmt`][nixfmt] +* format your code with [`nixpkgs-fmt`][nixpkgs-fmt] * The commit message follows the same semantics as [nixpkgs][nixpkgs]. * You can use a `#` symbol to specify ambiguities. For example, `develop#zsh: ` would tell me that your updating the `zsh` subprofile living under the `develop` profile. -[nixfmt]: https://github.com/serokell/nixfmt +[nixpkgs-fmt]: https://github.com/nix-community/nixpkgs-fmt [nixpkgs]: https://github.com/NixOS/nixpkgs diff --git a/profiles/develop/kakoune/default.nix b/profiles/develop/kakoune/default.nix index a2514f6..0a4eb81 100644 --- a/profiles/develop/kakoune/default.nix +++ b/profiles/develop/kakoune/default.nix @@ -6,7 +6,7 @@ kak-lsp kakoune-config kakoune-unwrapped - nixfmt + nixpkgs-fmt python3Packages.python-language-server rustup nix-linter diff --git a/profiles/develop/kakoune/lint/nix.kak b/profiles/develop/kakoune/lint/nix.kak index 7b5c1fd..a5e9ed7 100644 --- a/profiles/develop/kakoune/lint/nix.kak +++ b/profiles/develop/kakoune/lint/nix.kak @@ -4,7 +4,7 @@ hook -group lint global WinSetOption filetype=nix %{ set buffer lintcmd '/etc/xdg/kak/autoload/lint/nix.sh $1' lint-enable - set buffer formatcmd "nixfmt" + set buffer formatcmd "nixpkgs-fmt" hook buffer BufWritePre .* %{ format lint diff --git a/profiles/develop/kakoune/lint/nix.sh b/profiles/develop/kakoune/lint/nix.sh index 93a50dc..f69726c 100755 --- a/profiles/develop/kakoune/lint/nix.sh +++ b/profiles/develop/kakoune/lint/nix.sh @@ -1,6 +1,6 @@ #!/usr/bin/env zsh -nix-linter $1 2>&1 | < /dev/stdin > /tmp/lint.out +nix-linter -W all $1 2>&1 | < /dev/stdin > /tmp/lint.out if head -1 /tmp/lint.out | grep Failure &> /dev/null; then sed -n 2p /tmp/lint.out | tr '\n' ' ' printf "error: "