mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 06:08:11 +09:00
fix: use nixfmt directly in nixvim to avoid format timeout
This commit is contained in:
@@ -52,6 +52,7 @@ in
|
|||||||
stylua
|
stylua
|
||||||
shfmt
|
shfmt
|
||||||
alejandra
|
alejandra
|
||||||
|
nixfmt-rfc-style
|
||||||
lua-language-server
|
lua-language-server
|
||||||
nixd
|
nixd
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -15,17 +15,7 @@ _: {
|
|||||||
sh = [ "shfmt" ];
|
sh = [ "shfmt" ];
|
||||||
};
|
};
|
||||||
formatters.nix_fmt = {
|
formatters.nix_fmt = {
|
||||||
command = "nix";
|
command = "nixfmt";
|
||||||
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
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
format_on_save.__raw = ''
|
format_on_save.__raw = ''
|
||||||
function(_)
|
function(_)
|
||||||
|
|||||||
Reference in New Issue
Block a user