nvim.nix/config/plugins/lsp/conform.nix

27 lines
467 B
Nix
Raw Normal View History

2024-08-08 09:50:00 +08:00
{pkgs, ...}:
{
plugins.conform-nvim = {
enable = true;
# Run the formatter on file save.
formatOnSave = {
lspFallback = true;
timeoutMs = 500;
};
# Receive notificaton when a formatter errors.
notifyOnError = true;
# Map of filetype to formatters.
formattersByFt = {
c = ["clang-format"];
nix = ["alejandra"];
};
};
# Install our formatters.
extraPackages = with pkgs; [
alejandra
];
}