mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-24 17:58:51 +02:00
fix(format): wrap custom formatter with error handler
This commit is contained in:
parent
886d49eb89
commit
0e5ff5c0ab
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ function M.format(opts)
|
|||
return
|
||||
end
|
||||
|
||||
if M.custom_format and M.custom_format(buf) then
|
||||
if M.custom_format and Util.try(function()
|
||||
M.custom_format(buf)
|
||||
end, { msg = "Custom formatter failed" }) then
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue