mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 02:18:12 +09:00
fix: use nixfmt directly in nixvim to avoid format timeout
This commit is contained in:
@@ -52,6 +52,7 @@ in
|
||||
stylua
|
||||
shfmt
|
||||
alejandra
|
||||
nixfmt-rfc-style
|
||||
lua-language-server
|
||||
nixd
|
||||
];
|
||||
|
||||
@@ -15,17 +15,7 @@ _: {
|
||||
sh = [ "shfmt" ];
|
||||
};
|
||||
formatters.nix_fmt = {
|
||||
command = "nix";
|
||||
args = [
|
||||
"fmt"
|
||||
"$FILENAME"
|
||||
];
|
||||
stdin = false;
|
||||
condition.__raw = ''
|
||||
function()
|
||||
return vim.fn.executable("nix") == 1 and vim.fn.filereadable(vim.fn.findfile("flake.nix", ".;")) == 1
|
||||
end
|
||||
'';
|
||||
command = "nixfmt";
|
||||
};
|
||||
format_on_save.__raw = ''
|
||||
function(_)
|
||||
|
||||
Reference in New Issue
Block a user