diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-05-05 23:56:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 23:56:00 +0200 |
commit | 55187de1157e05ea71c7c0404345dee0e27e963e (patch) | |
tree | 26992fedae9b7849990c047f83f1ed6f1dd91ea7 /runtime/doc | |
parent | d14d308ce80df428393bccd36bdfd1c295e8f35f (diff) | |
download | rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.tar.gz rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.tar.bz2 rneovim-55187de1157e05ea71c7c0404345dee0e27e963e.zip |
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
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/lsp.txt | 12 |
1 files changed, 10 insertions, 2 deletions
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 |