-
Notifications
You must be signed in to change notification settings - Fork 89
Implement the 'textDocument/rename' command #337
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah this is really really cool! I like that you just use references. It would be great to add some tests. If you look into our tests we have very comprehensive tests which should be easy to use.
Thanks! I will try to add some tests in the next days. I see that is possible to spin up a tests langserver. |
@keegancsmith I added some tests for rename command. Please could you have a look? Thanks |
Plus 1 for this. #220 |
@keegancsmith Any chance to get this merged soon? Thanks |
Shit sorry, did not mean to ignore this. I'll take a look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got an inline comment but super minor so lets just ignore it :) I'm not 100% confident that the ranges returned by references will always be the correct one w.r.t. renaming. But lets ship this and see how it behaves in practice.
} | ||
|
||
result := lsp.WorkspaceEdit{} | ||
if result.Changes == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: result.Changes will always be nil here. Rather just initialize it
No description provided.