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