refactor: restructure config files

This commit is contained in:
2026-04-27 15:59:20 +02:00
parent bac6e4997b
commit 0b2ecd31b0
58 changed files with 6 additions and 2 deletions
@@ -0,0 +1,42 @@
require("lz.n").load({
{
"conform.nvim",
event = "BufWritePre",
cmd = "ConformInfo",
keys = {
{
"<leader>f",
function()
require("conform").format({ async = true, lsp_format = "fallback" })
end,
mode = "",
desc = "[F]ormat buffer",
},
},
after = function()
require("conform").setup({
notify_on_error = true,
format_on_save = function(bufnr)
local disable_filetypes = { c = true, cpp = true }
if disable_filetypes[vim.bo[bufnr].filetype] then
return nil
else
return {
timeout_ms = 500,
lsp_format = "fallback",
}
end
end,
formatters_by_ft = {
lua = { "stylua" },
python = { "ruff_fix", "ruff_format", "ruff_organize_imports" },
},
formatters = {
stylua = {
prepend_args = { "--indent-type", "Spaces", "--indent-width", "2" },
},
},
})
end,
},
})