Skip to content

Commit

Permalink
fix(lsp): add textDocument/prepareRename to capability map (neovim#15961
Browse files Browse the repository at this point in the history
)

This is a simple fix for neovim#15899, as it should at least stop calling
`prepareRename` on servers that don't support renaming.

I imagine a better fix would be to inspect the actual value for, but
that requires some plumbing changes on how capabilities are evaluated
before sending requests out.

Co-authored-by: francisco souza <fsouza@users.noreply.github.com>
  • Loading branch information
fsouza and fsouza committed Oct 8, 2021
1 parent d5dd0aa commit fcc11d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/lua/vim/lsp.lua
Expand Up @@ -41,6 +41,7 @@ lsp._request_name_to_capability = {
['textDocument/documentSymbol'] = 'document_symbol';
['textDocument/prepareCallHierarchy'] = 'call_hierarchy';
['textDocument/rename'] = 'rename';
['textDocument/prepareRename'] = 'rename';
['textDocument/codeAction'] = 'code_action';
['textDocument/codeLens'] = 'code_lens';
['codeLens/resolve'] = 'code_lens_resolve';
Expand Down

0 comments on commit fcc11d5

Please sign in to comment.