Uh oh!
There was an error while loading. Please reload this page.
Add rename support for constants - #2626
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
16b741b to
f15a0afComparef15a0af to
ae8a87aCompare❌ Deploy Preview for ruby-lsp failed.
|
Uh oh!
There was an error while loading. Please reload this page.
ae8a87a to
a40caf8Compareandyw8
commented
Oct 2, 2024
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Should we allow people to change namespaces with this? e.g. renaming It 'works' but does complicate some things. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
a40caf8 to
f0cbd0dCompareUh oh!
There was an error while loading. Please reload this page.
f0cbd0d to
c60e050Compareandyw8
commented
Oct 2, 2024
🤔 If a constant is already defined, should we prevent someone to renaming to that constant? |
Uh oh!
There was an error while loading. Please reload this page.
c60e050 to
21f56afComparevinistock
commented
Oct 2, 2024
Added a check for this. Great catch. |
st0012
left a comment
There was a problem hiding this comment.
I still prefer assigning attributes to ivars. But it's a small detail that can be discussed later.
21f56af to
377e988Compare
Motivation
Closes#57
This PR adds rename support for constants, modules and classes.
Implementation
ReferenceFinder. This is essentially a simplified copy of our declaration listener. I believe that either the declaration listener can be modified to support collecting references or we can extract some abstraction for both to use. However, I would like to start with a copy, so that we can see the patterns emerge as we add support for more renamesAutomated Tests
Added tests.