aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-10-29 09:51:14 +0000
committerGitHub <noreply@github.com>2024-10-29 09:51:14 +0000
commit2cd6abf0d7b1fb0ff71c2cb75913170025f8c915 (patch)
treefe906621455c9070d43fc2095a02e3cfc32c70f4 /runtime/doc
parent8f9401f5c80a8a72128b8bd8279689daf13f3a04 (diff)
parent8260e4860b27a54a061bd8e2a9da23069993953a (diff)
downloadrneovim-2cd6abf0d7b1fb0ff71c2cb75913170025f8c915.tar.gz
rneovim-2cd6abf0d7b1fb0ff71c2cb75913170025f8c915.tar.bz2
rneovim-2cd6abf0d7b1fb0ff71c2cb75913170025f8c915.zip
Merge pull request #30935 from lewis6991/feat/lsp_multi_hover
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt2
-rw-r--r--runtime/doc/lsp.txt38
-rw-r--r--runtime/doc/news.txt11
3 files changed, 21 insertions, 30 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 42c4df16e8..9c973b20bd 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -48,6 +48,8 @@ LSP
`{focus=true}` instead.
• *vim.lsp.buf.execute_command* Use |Client:exec_cmd()| instead.
• *vim.lsp.buf.completion* Use |vim.lsp.completion.trigger()| instead.
+• vim.lsp.buf_request_all The `error` key has been renamed to `err` inside
+ the result parameter of the handler.
------------------------------------------------------------------------------
DEPRECATED IN 0.10 *deprecated-0.10*
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index fdec63bb0b..751a66771c 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -703,7 +703,10 @@ buf_request_all({bufnr}, {method}, {params}, {handler})
Parameters: ~
• {bufnr} (`integer`) Buffer handle, or 0 for current.
• {method} (`string`) LSP method name
- • {params} (`table?`) Parameters to send to the server
+ • {params} (`table|(fun(client: vim.lsp.Client, bufnr: integer): table?)?`)
+ Parameters to send to the server. Can also be passed as a
+ function that returns the params table for cases where
+ parameters are specific to the client.
• {handler} (`function`) Handler called after all requests are
completed. Server results are passed as a
`client_id:result` map.
@@ -1269,6 +1272,13 @@ Lua module: vim.lsp.buf *lsp-buf*
• {title}? (`string`) Title for the list.
• {context}? (`table`) `ctx` from |lsp-handler|
+*vim.lsp.buf.hover.Opts*
+ Extends: |vim.lsp.util.open_floating_preview.Opts|
+
+
+ Fields: ~
+ • {silent}? (`boolean`)
+
*vim.lsp.buf.add_workspace_folder()*
add_workspace_folder({workspace_folder})
@@ -1386,7 +1396,7 @@ format({opts}) *vim.lsp.buf.format()*
contain `start` and `end` keys as described above, in which
case `textDocument/rangesFormatting` support is required.
-hover() *vim.lsp.buf.hover()*
+hover({config}) *vim.lsp.buf.hover()*
Displays hover information about the symbol under the cursor in a floating
window. The window will be dismissed on cursor move. Calling the function
twice will jump into the floating window (thus by default, "KK" will open
@@ -1394,6 +1404,9 @@ hover() *vim.lsp.buf.hover()*
mappings are available as usual, except that "q" dismisses the window. You
can scroll the contents the same as you would any other buffer.
+ Parameters: ~
+ • {config} (`vim.lsp.buf.hover.Opts?`) See |vim.lsp.buf.hover.Opts|.
+
implementation({opts}) *vim.lsp.buf.implementation()*
Lists all the implementations for the symbol under the cursor in the
quickfix window.
@@ -1813,27 +1826,6 @@ stop({bufnr}, {client_id}) *vim.lsp.semantic_tokens.stop()*
==============================================================================
Lua module: vim.lsp.handlers *lsp-handlers*
-hover({_}, {result}, {ctx}, {config}) *vim.lsp.handlers.hover()*
- |lsp-handler| for the method "textDocument/hover" >lua
- vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(
- vim.lsp.handlers.hover, {
- -- Use a sharp border with `FloatBorder` highlights
- border = "single",
- -- add the title in hover float window
- title = "hover"
- }
- )
-<
-
- Parameters: ~
- • {result} (`lsp.Hover`)
- • {ctx} (`lsp.HandlerContext`)
- • {config} (`table`) Configuration table.
- • border: (default=nil)
- • Add borders to the floating window
- • See |vim.lsp.util.open_floating_preview()| for more
- options.
-
*vim.lsp.handlers.signature_help()*
signature_help({_}, {result}, {ctx}, {config})
|lsp-handler| for the method "textDocument/signatureHelp".
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index d35ca2f0bc..91d36accc7 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -81,13 +81,10 @@ LSP
customizing the transformation of an LSP CompletionItem to |complete-items|.
• |vim.lsp.diagnostic.from()| can be used to convert a list of
|vim.Diagnostic| objects into their LSP diagnostic representation.
-• |vim.lsp.buf.references()| now handles multiple clients but no longer
- triggers the global `textDocument/references` handler from
- `vim.lsp.handlers`
-• |vim.lsp.buf.declaration()|, |vim.lsp.buf.definition()|,
- |vim.lsp.buf.type_definition()| and |vim.lsp.buf.implementation()| now
- support merging the results of multiple clients but no longer trigger the
- global handlers from `vim.lsp.handlers`
+• |vim.lsp.buf.references()|, |vim.lsp.buf.declaration()|, |vim.lsp.buf.definition()|,
+ |vim.lsp.buf.type_definition()|, |vim.lsp.buf.implementation()| and
+ |vim.lsp.buf.hover()| now support merging the results of multiple clients
+ but no longer trigger the global handlers from `vim.lsp.handlers`
• |vim.lsp.buf.typehierarchy()| now passes the correct params for each
client request.