mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 01:18:30 +09:00
fix: nix fmt
This commit is contained in:
@@ -11,9 +11,22 @@ _: {
|
||||
yaml.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
markdown.__raw = ''{ "prettierd", "prettier", stop_after_first = true }'';
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "alejandra" ];
|
||||
nix.__raw = ''{ "nix_fmt", "alejandra", stop_after_first = true }'';
|
||||
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
|
||||
'';
|
||||
};
|
||||
format_on_save.__raw = ''
|
||||
function(_)
|
||||
return { timeout_ms = 1000, lsp_format = "fallback" }
|
||||
|
||||
Reference in New Issue
Block a user