Skip to content

Commit

Permalink
fix: LSP formatter respects quiet = true
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Sep 17, 2023
1 parent 0d963f8 commit 5e4d258
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/conform/lsp_format.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e4d258

Please sign in to comment.