Commit message:

- Update `conform.nix` to configure notifyOnError and add keymaps for conform.nvim.
- Remove deprecated format_on_save settings.
- Add new key mappings for formatting with conform.nvim.
This commit is contained in:
♥ Minnie ♥ 2025-02-19 23:47:16 +08:00
parent 3d0b34c714
commit ff3656deb7
Signed by: jasmine
GPG key ID: 8563E358D4E8040E

View file

@ -7,14 +7,6 @@
enable = true;
settings = {
# Run the formatter on file save.
format_on_save = {
lspFallback = true;
timeoutMs = 500;
};
# Receive notificaton when a formatter errors.
notifyOnError = true;
# Map of filetype to formatters.
formatters_by_ft = {
c = ["clang-format"];
@ -34,6 +26,25 @@
command = lib.getExe pkgs.stylua;
};
};
# Receive notificaton when a formatter errors.
notifyOnError = true;
};
};
# Keymaps for conform.nvim
keymaps = [
{
mode = "";
key = "<leader>f";
action.__raw = ''
function()
require('conform').format { async = true, lsp_fallback = true }
end
'';
options = {
desc = "Format buffer";
};
}
];
}