Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[textDocument/rename] client doesn't obey RenameOptions while registering provider #416

Closed
Talv opened this issue Sep 16, 2018 · 3 comments

Comments

@Talv
Copy link

Talv commented Sep 16, 2018

prepareRename handler can't be registered because options.prepareProvider is never being set, even if server does include it in its capabilities.

Fix:

--- a/client/src/client.ts
+++ b/client/src/client.ts
@@ -2002,7 +2002,7 @@ class RenameFeature extends TextDocumentFeature<RenameRegistrationOptions> {
                }
                this.register(this.messages, {
                        id: UUID.generateUuid(),
-                       registerOptions: Object.assign({}, { documentSelector: documentSelector })
+                       registerOptions: Object.assign({}, { documentSelector: documentSelector }, capabilities.renameProvider)
                });
        }

https://github.com/Microsoft/vscode-languageserver-node/blob/d168533600cafd64023cade9f2b5e6dee74134d4/client/src/client.ts#L2005

@dbaeumer
Copy link
Member

@Talv very good catch. And sorry for the late response.

@dbaeumer
Copy link
Member

@rcjsuen FYI.

@rcjsuen
Copy link
Contributor

rcjsuen commented Oct 16, 2018

Good to know for future contributions.

Thanks for catching this, @Talv!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants