install: conform.nvim

This commit is contained in:
♥ Minnie ♥ 2024-08-08 09:50:00 +08:00
parent e3dc3f07d6
commit a6a7676c4e
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
2 changed files with 27 additions and 0 deletions

View file

@ -25,6 +25,7 @@
./plugins/ui/lualine.nix ./plugins/ui/lualine.nix
# LSP and formatting # LSP and formatting
./plugins/lsp/conform.nix
./plugins/lsp/lsp.nix ./plugins/lsp/lsp.nix
# Git # Git

View file

@ -0,0 +1,26 @@
{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
];
}