aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2023-06-22 13:54:35 +0200
committerGitHub <noreply@github.com>2023-06-22 13:54:35 +0200
commit134b9ec483616e20d96c26fdb7ef3f3e912108a8 (patch)
treeaf8170e70f47dae45b9110101407f9ea8805e85e /runtime/doc
parent2f17ef1fc4b96cf1106fd95ba090d34a2e4b977b (diff)
downloadrneovim-134b9ec483616e20d96c26fdb7ef3f3e912108a8.tar.gz
rneovim-134b9ec483616e20d96c26fdb7ef3f3e912108a8.tar.bz2
rneovim-134b9ec483616e20d96c26fdb7ef3f3e912108a8.zip
feat(lsp): soft deprecate vim.lsp.for_each_buffer_client (#24104)
There is no need for two ways to access all clients of a buffer. This doesn't add a `vim.deprecate` call yet, as the function is probably used a lot, but removes it from the documentation and annotates it with `@deprecated`
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt1
-rw-r--r--runtime/doc/lsp.txt15
-rw-r--r--runtime/doc/news.txt1
3 files changed, 2 insertions, 15 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 6fb11f0987..9a622741b5 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -139,6 +139,7 @@ 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()|
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 6d28b71cdd..055aff2210 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -751,21 +751,6 @@ client_is_stopped({client_id}) *vim.lsp.client_is_stopped()*
Return: ~
(boolean) stopped true if client is stopped, false otherwise.
- *vim.lsp.for_each_buffer_client()*
-for_each_buffer_client({bufnr}, {fn})
- Invokes a function for each LSP client attached to a buffer.
-
- Parameters: ~
- • {bufnr} (integer) Buffer number
- • {fn} (function) Function to run on each client attached to buffer
- {bufnr}. The function takes the client, client ID, and buffer
- number as arguments. Example: >lua
-
- vim.lsp.for_each_buffer_client(0, function(client, client_id, bufnr)
- print(vim.inspect(client))
- end)
-<
-
formatexpr({opts}) *vim.lsp.formatexpr()*
Provides an interface between the built-in client and a `formatexpr`
function.
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 292b0da1af..153441b0a5 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -167,6 +167,7 @@ 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.loop` has been renamed to `vim.uv`.