Skip to content

Commit

Permalink
fixup: remove redundant judge.
Browse files Browse the repository at this point in the history
  • Loading branch information
ayamir committed Jun 30, 2024
1 parent 7918ffe commit 4327b9a
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lua/modules/configs/completion/formatting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,14 @@ function M.format(opts)
format_modifications_only
and require("lsp-format-modifications").format_modifications(client, bufnr).success
then
if require("lsp-format-modifications").format_modifications(client, bufnr).success then
if format_notify then
vim.notify(
string.format("[LSP] Format changed lines successfully with %s!", client.name),
vim.log.levels.INFO,
{ title = "LSP Range Format Success" }
)
end
return
if format_notify then
vim.notify(
string.format("[LSP] Format changed lines successfully with %s!", client.name),
vim.log.levels.INFO,
{ title = "LSP Range Format Success" }
)
end
return
end

-- Fall back to format the whole buffer (even if partial formatting failed)
Expand Down

0 comments on commit 4327b9a

Please sign in to comment.