diff options
Diffstat (limited to 'runtime/doc/lsp.txt')
-rw-r--r-- | runtime/doc/lsp.txt | 42 |
1 files changed, 21 insertions, 21 deletions
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 |