hover fallback to signature help

pull/296/head
ray-x 5 months ago
parent 40d1907f57
commit 98540ed2a8

@ -8,7 +8,10 @@ function M.handler(_, result, ctx, config)
config.focus_id = ctx.method
config.zindex = 53
if not (result and result.contents) then
vim.notify('No information available')
-- vim.notify('No information available')
vim.schedule(function()
vim.lsp.buf.signature_help()
end)
return
end
local ft = vim.bo.ft
@ -16,7 +19,9 @@ function M.handler(_, result, ctx, config)
local markdown_lines = util.convert_input_to_markdown_lines(result.contents)
markdown_lines = nutils.trim_empty_lines(markdown_lines)
if vim.tbl_isempty(markdown_lines) then
vim.notify('No information available')
vim.schedule(function()
vim.lsp.buf.signature_help()
end)
return
end

@ -506,11 +506,11 @@ function M.setup(attach_opts)
if _NgConfigValues.border == 'double' then
border_style = double
end
-- if _NgConfigValues.lsp.hover then
-- vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(require('navigator.hover').handler, {
-- border = border_style,
-- })
-- end
if _NgConfigValues.lsp.hover.enable then
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(require('navigator.hover').handler, {
border = border_style,
})
end
if cap.documentFormattingProvider then
log('formatting enabled setup hdl')
vim.lsp.handlers['textDocument/formatting'] = require('navigator.formatting').format_hdl

Loading…
Cancel
Save