From eb16ce62cba79774f26b2b10e83d691c732dd729 Mon Sep 17 00:00:00 2001 From: Ahmed El Gabri Date: Sat, 27 Jul 2024 12:42:09 +0300 Subject: [PATCH] nix: using the official nixpkgs formatter see https://github.com/NixOS/rfcs/pull/166 --- config/nvim/lua/plugins/formatter.lua | 2 +- nix/modules/shared/vim.nix | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/nvim/lua/plugins/formatter.lua b/config/nvim/lua/plugins/formatter.lua index 3c0279d6..3de8cbea 100644 --- a/config/nvim/lua/plugins/formatter.lua +++ b/config/nvim/lua/plugins/formatter.lua @@ -111,7 +111,7 @@ return { -- this will run gofmt too 'goimports', }, - nix = { 'nixpkgs_fmt', 'statix' }, + nix = { 'nixfmt' }, toml = { 'taplo' }, }, format_on_save = function(bufnr) diff --git a/nix/modules/shared/vim.nix b/nix/modules/shared/vim.nix index 589bca75..63d0aebd 100644 --- a/nix/modules/shared/vim.nix +++ b/nix/modules/shared/vim.nix @@ -43,7 +43,8 @@ in # editorconfig-checker # do I use it? hadolint # Docker linter dotenv-linter - nixpkgs-fmt + nixfmt-rfc-style + # nixfmt vim-vint shellcheck shfmt # Doesn't work with zsh, only sh & bash