Merge pull request #14309 from mjlbach/feature/hover_return_win_buf

lsp: hover window should return buf/winnr from focusable float
This commit is contained in:
Michael Lingelbach
2021-04-07 00:58:32 -07:00
committed by GitHub

View File

@@ -260,7 +260,7 @@ end
--- - See |vim.api.nvim_open_win()|
function M.hover(_, method, result, _, _, config)
config = config or {}
util.focusable_float(method, function()
local bufnr, winnr = util.focusable_float(method, function()
if not (result and result.contents) then
-- return { 'No information available' }
return
@@ -277,6 +277,7 @@ function M.hover(_, method, result, _, _, config)
util.close_preview_autocmd({"CursorMoved", "BufHidden", "InsertCharPre"}, winnr)
return bufnr, winnr
end)
return bufnr, winnr
end
--@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_hover