From 55187de1157e05ea71c7c0404345dee0e27e963e Mon Sep 17 00:00:00 2001 From: Mathias Fußenegger Date: Thu, 5 May 2022 23:56:00 +0200 Subject: fix(lsp): fix rename capability checks and multi client support (#18441) Adds filter and id options to filter the client to use for rename. Similar to the recently added `format` function. rename will use all matching clients one after another and can handle a mix of prepareRename/rename support. Also ensures the right `offset_encoding` is used for the `make_position_params` calls --- runtime/doc/lsp.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 71ff0b2be5..be46bbfa66 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1216,13 +1216,21 @@ remove_workspace_folder({workspace_folder}) {path} is not provided, the user will be prompted for a path using |input()|. -rename({new_name}) *vim.lsp.buf.rename()* +rename({new_name}, {options}) *vim.lsp.buf.rename()* Renames all references to the symbol under the cursor. Parameters: ~ - {new_name} (string) If not provided, the user will be + {new_name} string|nil If not provided, the user will be prompted for a new name using |vim.ui.input()|. + {options} table|nil additional options + • filter (function|nil): Predicate to filter + clients used for rename. Receives the + attached clients as argument and must return + a list of clients. + • name (string|nil): Restrict clients used for + rename to ones where client.name matches + this field. server_ready() *vim.lsp.buf.server_ready()* Checks whether the language servers attached to the current -- cgit