aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/runner.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/conform/runner.lua')
-rw-r--r--lua/conform/runner.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/conform/runner.lua b/lua/conform/runner.lua
index 15c9713..83647a2 100644
--- a/lua/conform/runner.lua
+++ b/lua/conform/runner.lua
@@ -259,6 +259,10 @@ M.format_sync = function(bufnr, formatters, timeout_ms)
for _, formatter in ipairs(formatters) do
local remaining = timeout_ms - (uv.hrtime() / 1e6 - start)
+ if remaining <= 0 then
+ vim.notify(string.format("Formatter '%s' timed out", formatter.name), vim.log.levels.WARN)
+ return
+ end
local done = false
local result = nil
run_formatter(bufnr, formatter, input_lines, function(err, output)