aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2023-09-16 22:37:45 -0700
committerSteven Arcangeli <stevearc@stevearc.com>2023-09-16 22:37:45 -0700
commit5e4d258f8eba4090b9a515ee9b77d8647394b2cd (patch)
tree47b15b34ec917d0e7afbb011cd34a7a0110c3969
parent0d963f82add9ca4faf49b54fc28f57038742ded3 (diff)
fix: LSP formatter respects quiet = true
-rw-r--r--lua/conform/lsp_format.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/conform/lsp_format.lua b/lua/conform/lsp_format.lua
index 1400f3b..0315314 100644
--- a/lua/conform/lsp_format.lua
+++ b/lua/conform/lsp_format.lua
@@ -105,7 +105,9 @@ function M.format(options, callback)
if result and result.result then
apply_text_edits(result.result, bufnr, client.offset_encoding)
elseif err then
- vim.notify(string.format("[LSP][%s] %s", client.name, err), vim.log.levels.WARN)
+ if not options.quiet then
+ vim.notify(string.format("[LSP][%s] %s", client.name, err), vim.log.levels.WARN)
+ end
return callback(string.format("[LSP][%s] %s", client.name, err))
end
end