From 36ee10057ab9a93144975449cc5e27f9b96e0af3 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Sat, 25 Mar 2023 09:01:39 -0400 Subject: [PATCH] fix(lsp): add missing silent check in lsp hover handler (#22763) Fixup to #21531. --- runtime/lua/vim/lsp/handlers.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index ee5b63d260..d01f8e6159 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -364,7 +364,9 @@ function M.hover(_, result, ctx, config) local markdown_lines = util.convert_input_to_markdown_lines(result.contents) markdown_lines = util.trim_empty_lines(markdown_lines) if vim.tbl_isempty(markdown_lines) then - vim.notify('No information available') + if config.silent ~= true then + vim.notify('No information available') + end return end return util.open_floating_preview(markdown_lines, 'markdown', config)