mirror of
https://github.com/ray-x/navigator.lua
synced 2024-11-05 12:00:21 +00:00
hover fallback to signature help
This commit is contained in:
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…
Reference in New Issue
Block a user