feat(conform): do not disable formatters on timeout

This commit is contained in:
2025-12-29 12:05:57 +02:00
committed by Mykhailo Nikiforov
parent 06ccfa6b64
commit 42719a9f92

View File

@@ -124,14 +124,15 @@
return return
end end
if slow_format_filetypes[vim.bo[bufnr].filetype] then -- if slow_format_filetypes[vim.bo[bufnr].filetype] then
return -- return
end -- end
local function on_format(err) local function on_format(err)
if err and err:match("timeout$") then return
slow_format_filetypes[vim.bo[bufnr].filetype] = true -- if err and err:match("timeout$") then
end -- slow_format_filetypes[vim.bo[bufnr].filetype] = true
-- end
end end
return { timeout_ms = 200, lsp_fallback = true }, on_format return { timeout_ms = 200, lsp_fallback = true }, on_format