Skip to content

Commit

Permalink
feat: dont show lsp doc when empty
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Oct 29, 2022
1 parent c7f1fca commit a61a07f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lua/noice/lsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,12 @@ function M.signature(_, result, ctx, config)
result.ft = vim.bo[ctx.bufnr].filetype
result.message = message
Signature.new(result):format()
if message:is_empty() then
if not config.trigger then
vim.notify("No signature help available")
end
return
end
M.show(message, config.stay)
end
end
Expand All @@ -205,6 +211,10 @@ function M.hover(_, result)

if not message:focus() then
Format.format(message, result.contents)
if message:is_empty() then
vim.notify("No information available")
return
end
M.show(message)
end
end
Expand Down

0 comments on commit a61a07f

Please sign in to comment.