From 7918ffe3f1d70902c54d3052edbec2bc9913c3ec Mon Sep 17 00:00:00 2001 From: Mohu Date: Sun, 30 Jun 2024 13:12:44 +0800 Subject: [PATCH] fixup: merge judgements. Co-authored-by: jint_lzxy_ <50296129+Jint-lzxy@users.noreply.github.com> Signed-off-by: Mohu --- lua/modules/configs/completion/formatting.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/modules/configs/completion/formatting.lua b/lua/modules/configs/completion/formatting.lua index 12fecd836..22f481633 100644 --- a/lua/modules/configs/completion/formatting.lua +++ b/lua/modules/configs/completion/formatting.lua @@ -159,7 +159,10 @@ function M.format(opts) return end - if format_modifications_only then + if + 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(