This commit is contained in:
2026-02-18 21:23:56 +01:00
commit 11ce3ba32f
41 changed files with 2422 additions and 0 deletions

33
home/neovim/conform.nix Normal file
View File

@@ -0,0 +1,33 @@
{ pkgs, ... }: {
# Conform: Code formatter that runs external formatting tools
# Automatically formats code on save for consistent style.
programs.nixvim = {
plugins.conform-nvim = {
enable = true;
settings = {
formatters_by_ft = {
lua = [ "stylua" ];
nix = [ "nixfmt" ];
python = [ "black" ];
rust = [ "rustfmt" ];
rasi = [ "prettierd" ];
};
format_on_save = {
timeout_ms = 2000;
lsp_fallback = true;
};
};
};
# Install formatters
extraPackages = with pkgs; [
stylua
nixfmt
black
rustfmt
prettierd
];
};
}