FormatEnable and FormatDisable now actually works

This commit is contained in:
Dreaded_X 2024-04-13 16:59:57 +02:00
parent b19f90dc7f
commit 2ac26b8d7a
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

View File

@ -35,9 +35,12 @@ return {
-- ["*"] = { "codespell" },
["_"] = { "trim_whitespace", "trim_newlines" },
},
format_after_save = {
lsp_fallback = true,
},
format_after_save = function(bufnr)
if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
return
end
return { lsp_fallback = true }
end,
notify_on_error = true,
},
init = function()