fix(lsp): add textDocument/prepareRename to capability map (#15961)

This is a simple fix for #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>
This commit is contained in:
francisco souza 2021-10-08 14:30:18 -04:00 committed by GitHub
parent d5dd0aa1e6
commit fcc11d5942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,6 +41,7 @@ lsp._request_name_to_capability = {
['textDocument/documentSymbol'] = 'document_symbol'; ['textDocument/documentSymbol'] = 'document_symbol';
['textDocument/prepareCallHierarchy'] = 'call_hierarchy'; ['textDocument/prepareCallHierarchy'] = 'call_hierarchy';
['textDocument/rename'] = 'rename'; ['textDocument/rename'] = 'rename';
['textDocument/prepareRename'] = 'rename';
['textDocument/codeAction'] = 'code_action'; ['textDocument/codeAction'] = 'code_action';
['textDocument/codeLens'] = 'code_lens'; ['textDocument/codeLens'] = 'code_lens';
['codeLens/resolve'] = 'code_lens_resolve'; ['codeLens/resolve'] = 'code_lens_resolve';