From e36f7d811c396b60bcbf65f962b3f52d2f75b0b3 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 1 Oct 2023 23:30:56 +0200 Subject: [PATCH] feat(format): show warning when no formatter ran when using the format keymap --- lua/lazyvim/plugins/lsp/format.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazyvim/plugins/lsp/format.lua b/lua/lazyvim/plugins/lsp/format.lua index dbabbe53..7d1c9109 100644 --- a/lua/lazyvim/plugins/lsp/format.lua +++ b/lua/lazyvim/plugins/lsp/format.lua @@ -50,6 +50,9 @@ function M.format(opts) end, formatters.active) if #client_ids == 0 then + if opts and opts.force then + Util.warn("No formatter available", { title = "LazyVim" }) + end return end