aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-04-07 00:58:32 -0700
committerGitHub <noreply@github.com>2021-04-07 00:58:32 -0700
commit91cdc11984465287539ed8f63716bb371f440ea1 (patch)
tree3e13b5da0844d66f62c07b8d6dbd003b9757bc02
parentc2298503ce6480554e176e5c17e55974c0453959 (diff)
parent5610e8a4acaadb38925495f77aaed751efc0126f (diff)
downloadrneovim-91cdc11984465287539ed8f63716bb371f440ea1.tar.gz
rneovim-91cdc11984465287539ed8f63716bb371f440ea1.tar.bz2
rneovim-91cdc11984465287539ed8f63716bb371f440ea1.zip
Merge pull request #14309 from mjlbach/feature/hover_return_win_buf
lsp: hover window should return buf/winnr from focusable float
-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 cbccf16cd5..525ec4ce5b 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -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