From ce797e1a6572846b3f00ac1df2eb3ca35aa9bc0d Mon Sep 17 00:00:00 2001 From: Cookiez Date: Thu, 12 Mar 2026 10:09:55 +0100 Subject: [PATCH] Added alejandra formatter to neovim --- modules/neovim/home.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/neovim/home.nix b/modules/neovim/home.nix index 06f4483..051dd88 100644 --- a/modules/neovim/home.nix +++ b/modules/neovim/home.nix @@ -113,6 +113,22 @@ check_ts = true; # Use treesitter to avoid pairing inside strings/comments }; }; + conform-nvim = { + enable = true; + settings = { + formatters_by_ft = { + nix = ["alejandra"]; + }; + format_on_save = { + lsp_format = "fallback"; + timeout_ms = 500; + }; + }; + # Pin the exact binary path so Nix guarantees it's available + settings.formatters = { + alejandra.command = "${pkgs.alejandra}/bin/alejandra"; + }; + }; }; extraPlugins = with pkgs.vimPlugins; [