aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-04-07 00:21:56 -0700
committerMichael Lingelbach <m.j.lbach@gmail.com>2021-04-07 00:21:56 -0700
commit5610e8a4acaadb38925495f77aaed751efc0126f (patch)
treeee75a8a59e61d268f597ad77c89a1f02cbaa2773 /runtime/lua/vim/lsp/handlers.lua
parentb518b9076f59f3e24e4afb5fb9468b1d5212b1b5 (diff)
downloadrneovim-5610e8a4acaadb38925495f77aaed751efc0126f.tar.gz
rneovim-5610e8a4acaadb38925495f77aaed751efc0126f.tar.bz2
rneovim-5610e8a4acaadb38925495f77aaed751efc0126f.zip
lsp: hover window should return buf/winnr from focusable float
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index e0bb267e27..4685a90e80 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -269,7 +269,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
@@ -286,6 +286,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