This commit is contained in:
Tristan Knight 2024-09-18 00:08:41 +01:00 committed by GitHub
commit 96cbf57105
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 2 deletions

View File

@ -1397,7 +1397,13 @@ format({opts}) *vim.lsp.buf.format()*
hover() *vim.lsp.buf.hover()* hover() *vim.lsp.buf.hover()*
Displays hover information about the symbol under the cursor in a floating Displays hover information about the symbol under the cursor in a floating
window. Calling the function twice will jump into the floating window. window. The window will be dismissed on cursor move. Calling the function
twice will will jump into the floating window (thus by default, "KK" will
open the hover window and focus it). In the floating window, all commands
and mappings are available as usual, except that "q" dismisses the window.
You can scroll the contents the same as you would any other buffer. Once
focused in the floating window, the buffer content can be scrolled as
usual
implementation({opts}) *vim.lsp.buf.implementation()* implementation({opts}) *vim.lsp.buf.implementation()*
Lists all the implementations for the symbol under the cursor in the Lists all the implementations for the symbol under the cursor in the

View File

@ -29,7 +29,13 @@ local function request(method, params, handler)
end end
--- Displays hover information about the symbol under the cursor in a floating --- Displays hover information about the symbol under the cursor in a floating
--- window. Calling the function twice will jump into the floating window. --- window. The window will be dismissed on cursor move.
--- Calling the function twice will will jump into the floating window
--- (thus by default, "KK" will open the hover window and focus it).
--- In the floating window, all commands and mappings are available as usual,
--- except that "q" dismisses the window.
--- You can scroll the contents the same as you would any other buffer.
--- Once focused in the floating window, the buffer content can be scrolled as usual
function M.hover() function M.hover()
local params = util.make_position_params() local params = util.make_position_params()
request(ms.textDocument_hover, params) request(ms.textDocument_hover, params)