nixvim
nixvim copied to clipboard
[BUG] Conform plugin does not install enabled formatters
| Field | Description |
|---|---|
| Plugin | conform-nvim |
| Nixpkgs | pkgs.vimPlugins.conform-nvim |
| Home Manager | <VERSION> |
- [x] I have read the FAQ and my bug is not listed there.
Description
When a formatter is enabled in conform-nvim it is possible that the formatter is not installed on the system and then not work. It would be beneficial to make it so that if a formatter is enabled the formatter is installed from nixpkgs where possible.
Minimal, Reproducible Example (MRE)
programs.nixvim = {
conform-nvim = {
enable = true;
formattersByFt = {
"*" = [ "codespell" ];
"_" = [ "trim_whitespace" ];
go = [ "goimports" "golines" "gofmt" "gofumpt" ];
javascript = [ [ "prettierd" "prettier" ] ];
json = [ "jq" ];
lua = [ "stylua" ];
nix = [ "alejandra" ];
python = [ "isort" "black" ];
rust = [ "rustfmt" ];
sh = [ "shfmt" ];
terraform = [ "terraform_fmt" ];
};
};
}
Unless installed by some other means any one of these formatters could be missing and as a result not function.