mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
lsp: hover window should return buf/winnr from focusable float
This commit is contained in:
parent
b518b9076f
commit
5610e8a4ac
@ -269,7 +269,7 @@ end
|
|||||||
--- - See |vim.api.nvim_open_win()|
|
--- - See |vim.api.nvim_open_win()|
|
||||||
function M.hover(_, method, result, _, _, config)
|
function M.hover(_, method, result, _, _, config)
|
||||||
config = config or {}
|
config = config or {}
|
||||||
util.focusable_float(method, function()
|
local bufnr, winnr = util.focusable_float(method, function()
|
||||||
if not (result and result.contents) then
|
if not (result and result.contents) then
|
||||||
-- return { 'No information available' }
|
-- return { 'No information available' }
|
||||||
return
|
return
|
||||||
@ -286,6 +286,7 @@ function M.hover(_, method, result, _, _, config)
|
|||||||
util.close_preview_autocmd({"CursorMoved", "BufHidden", "InsertCharPre"}, winnr)
|
util.close_preview_autocmd({"CursorMoved", "BufHidden", "InsertCharPre"}, winnr)
|
||||||
return bufnr, winnr
|
return bufnr, winnr
|
||||||
end)
|
end)
|
||||||
|
return bufnr, winnr
|
||||||
end
|
end
|
||||||
|
|
||||||
--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover
|
--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover
|
||||||
|
Loading…
Reference in New Issue
Block a user