aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2023-07-17 18:27:16 +0200
committerGitHub <noreply@github.com>2023-07-17 18:27:16 +0200
commit1b9ccd38a12f8fdbdff51ef0b3ff363540f745ec (patch)
treee9433c169c338482cd4692ead619c4440703d527 /runtime/doc
parentd0d132fbd055834cbecb3d4e3a123a6ea8f099ec (diff)
downloadrneovim-1b9ccd38a12f8fdbdff51ef0b3ff363540f745ec.tar.gz
rneovim-1b9ccd38a12f8fdbdff51ef0b3ff363540f745ec.tar.bz2
rneovim-1b9ccd38a12f8fdbdff51ef0b3ff363540f745ec.zip
feat(lsp)!: rename vim.lsp.get_active_clients to get_clients (#24113)
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt5
-rw-r--r--runtime/doc/lsp.txt42
-rw-r--r--runtime/doc/news.txt3
3 files changed, 26 insertions, 24 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 6317789d22..81dd1e64bf 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -129,7 +129,7 @@ LSP FUNCTIONS
- *vim.lsp.util.diagnostics_to_items()* Use |vim.diagnostic.toqflist()| instead.
- *vim.lsp.util.set_qflist()* Use |setqflist()| instead.
- *vim.lsp.util.set_loclist()* Use |setloclist()| instead.
-- *vim.lsp.buf_get_clients()* Use |vim.lsp.get_active_clients()| with
+- *vim.lsp.buf_get_clients()* Use |vim.lsp.get_clients()| with
{buffer=bufnr} instead.
- *vim.lsp.buf.formatting()* Use |vim.lsp.buf.format()| with
{async=true} instead.
@@ -139,7 +139,8 @@ LSP FUNCTIONS
or |vim.lsp.buf.format()| instead.
- *vim.lsp.util.get_progress_messages()* Use |vim.lsp.status()| or access
`progress` of |vim.lsp.client|
-- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_active_clients()|
+- *vim.lsp.get_active_clients()* Use |vim.lsp.get_clients()|
+- *vim.lsp.for_each_buffer_client()* Use |vim.lsp.get_clients()|
TREESITTER FUNCTIONS
- *vim.treesitter.language.require_language()* Use |vim.treesitter.language.add()|
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index 450690fe3b..ec0072e10e 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -38,7 +38,7 @@ Follow these steps to get LSP features:
})
<
3. Check that the server attached to the buffer: >
- :lua =vim.lsp.get_active_clients()
+ :lua =vim.lsp.get_clients()
4. Configure keymaps and autocmds to use LSP features. See |lsp-config|.
@@ -105,7 +105,7 @@ calls behind capability checks:
To learn what capabilities are available you can run the following command in
a buffer with a started LSP client: >vim
- :lua =vim.lsp.get_active_clients()[1].server_capabilities
+ :lua =vim.lsp.get_clients()[1].server_capabilities
Full list of features provided by default can be found in |lsp-buf|.
@@ -114,7 +114,7 @@ FAQ *lsp-faq*
- Q: How to force-reload LSP?
- A: Stop all clients, then reload the buffer. >vim
- :lua vim.lsp.stop_client(vim.lsp.get_active_clients())
+ :lua vim.lsp.stop_client(vim.lsp.get_clients())
:edit
- Q: Why isn't completion working?
@@ -690,7 +690,7 @@ buf_request_sync({bufnr}, {method}, {params}, {timeout_ms})
client() *vim.lsp.client*
LSP client object. You can get an active client object via
- |vim.lsp.get_client_by_id()| or |vim.lsp.get_active_clients()|.
+ |vim.lsp.get_client_by_id()| or |vim.lsp.get_clients()|.
• Methods:
• request(method, params, [handler], bufnr) Sends a request to the
@@ -773,22 +773,6 @@ formatexpr({opts}) *vim.lsp.formatexpr()*
• timeout_ms (default 500ms). The timeout period for the
formatting request.
-get_active_clients({filter}) *vim.lsp.get_active_clients()*
- Get active clients.
-
- Parameters: ~
- • {filter} (table|nil) A table with key-value pairs used to filter the
- returned clients. The available keys are:
- • id (number): Only return clients with the given id
- • bufnr (number): Only return clients attached to this
- buffer
- • name (string): Only return clients with the given name
- • method (string): Only return clients supporting the given
- method
-
- Return: ~
- lsp.Client []: List of |vim.lsp.client| objects
-
*vim.lsp.get_buffers_by_client_id()*
get_buffers_by_client_id({client_id})
Returns list of buffers attached to client_id.
@@ -809,6 +793,22 @@ get_client_by_id({client_id}) *vim.lsp.get_client_by_id()*
Return: ~
(nil|lsp.Client) client rpc object
+get_clients({filter}) *vim.lsp.get_clients()*
+ Get active clients.
+
+ Parameters: ~
+ • {filter} (table|nil) A table with key-value pairs used to filter the
+ returned clients. The available keys are:
+ • id (number): Only return clients with the given id
+ • bufnr (number): Only return clients attached to this
+ buffer
+ • name (string): Only return clients with the given name
+ • method (string): Only return clients supporting the given
+ method
+
+ Return: ~
+ lsp.Client []: List of |vim.lsp.client| objects
+
get_log_path() *vim.lsp.get_log_path()*
Gets the path of the logfile used by the LSP client.
@@ -1040,7 +1040,7 @@ stop_client({client_id}, {force}) *vim.lsp.stop_client()*
You can also use the `stop()` function on a |vim.lsp.client| object. To stop all clients: >lua
- vim.lsp.stop_client(vim.lsp.get_active_clients())
+ vim.lsp.stop_client(vim.lsp.get_clients())
<
By default asks the server to shutdown, unless stop was requested already
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 67726ebd9c..6294a8b505 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -204,7 +204,8 @@ release.
• vim.lsp functions:
- |vim.lsp.util.get_progress_messages()| Use |vim.lsp.status()| instead.
- - |vim.lsp.for_each_buffer_client()| Use |vim.lsp.get_active_clients()| instead.
+ - |vim.lsp.get_active_clients()| Use |vim.lsp.get_clients()| instead.
+ - |vim.lsp.for_each_buffer_client()| Use |vim.lsp.get_clients()| instead.
• `vim.loop` has been renamed to `vim.uv`.