Added alejandra formatter to neovim

This commit is contained in:
2026-03-12 10:09:55 +01:00
parent 93bc7644f5
commit ce797e1a65

View File

@ -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; [