aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-04-29 23:04:00 +0200
committerGitHub <noreply@github.com>2022-04-29 23:04:00 +0200
commit9a1920e2238f8dcde3e923cf67dae2a46a4d40df (patch)
treea0304d85966ce671771f5e831723782ce86cbdee /runtime/lua/vim/lsp/handlers.lua
parent6d4180a0d20d0b730b6e64acdac39261f52a9277 (diff)
downloadrneovim-9a1920e2238f8dcde3e923cf67dae2a46a4d40df.tar.gz
rneovim-9a1920e2238f8dcde3e923cf67dae2a46a4d40df.tar.bz2
rneovim-9a1920e2238f8dcde3e923cf67dae2a46a4d40df.zip
feat(lsp): show feedback on empty hover response (#18308)
Without any feedback it gives the impression that the language server is not working properly, which isn't the case.
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 71b4d33ec0..978e44b6f8 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -298,13 +298,13 @@ function M.hover(_, result, ctx, config)
config = config or {}
config.focus_id = ctx.method
if not (result and result.contents) then
- -- return { 'No information available' }
+ vim.notify('No information available')
return
end
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
- -- return { 'No information available' }
+ vim.notify('No information available')
return
end
return util.open_floating_preview(markdown_lines, "markdown", config)