sublimelsp / LSP-typescript

TypeScript, JavaScript support for Sublime LSP plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Listing and renaming private class methods omits hash sign

tukusejssirs opened this issue · comments

When using private class members and classes, LSP and/or LSP-typescript omit hash sign.

When I rename a private class method, the class sign is not in the text box. When I simply rename the method without adding a leading hash sign, the hash sign is removed from the method and thus made public. When I rename the method to a name that includes a leading hash sign, it is renamed correctly as expected. I would expect to place a hash sign into the text box, but select only the rest of the method name.

When I list all methods (etc) using Goto Symbol, it lists all methods without hash sign. I’d expect to list all private methods with a hash sign, as it is required when the function is referenced and/or called.

To make experience better https://github.com/typescript-language-server/typescript-language-server needs to support prepareRename request but also LSP needs some fixes as it doesn't seem to implement that correctly.

Implementing support for prepareRename in typescript-language-server/typescript-language-server#628

Thanks, @rchl, for your reply, explanation and for the quick PR! 🙏

New version of LSP with fixed support for prepareRename is now released.

Thanks, @rchl, it works perfectly! 🙏