From 9a2a38af51d62f2f8a6066c7f3906b4d8bbe942e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viorel-C=C4=83t=C4=83lin=20R=C4=83pi=C8=9Beanu?= Date: Fri, 25 Oct 2024 09:12:02 +0300 Subject: [PATCH] feat: change nix formater from alejandra to nixfmt-rfc-style (#50) - The recommended nix formatter is nixfmt-rfc-style and not alejandra. --- config/plugins/lsp/conform.nix | 5 ++++- flake.nix | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index e3f3b01..88f998d 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -106,7 +106,7 @@ "isort" ]; lua = ["stylua"]; - nix = ["alejandra"]; + nix = ["nixfmt-rfc-style"]; markdown = [ [ "prettierd" @@ -137,6 +137,9 @@ isort = { command = "${lib.getExe pkgs.isort}"; }; + nixfmt-rfc-style = { + command = "${lib.getExe pkgs.nixfmt-rfc-style}"; + }; alejandra = { command = "${lib.getExe pkgs.alejandra}"; }; diff --git a/flake.nix b/flake.nix index db2a8e6..100b6e6 100644 --- a/flake.nix +++ b/flake.nix @@ -44,12 +44,12 @@ src = ./.; hooks = { statix.enable = true; - alejandra.enable = true; + nixfmt-rfc-style.enable = true; }; }; }; - formatter = pkgs.alejandra; + formatter = pkgs.nixfmt-rfc-style; packages.default = nvim;