hover fallback to signature help

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

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

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

Loading…
Cancel
Save