code-d
code-d copied to clipboard
Rename by symbol using F2
Its quite handy to have F2 work for renaming a variable or function across all areas its being used. This usually works when the variable or function is selected.
This worked (somewhat) in https://github.com/d-language-server/dls (which is unmaintained, so I moved over to code-d)
The implementation looks pretty uncomplicated, it just does a "find all references" for the symbol, and then textually replaces all the references with the new symbol.
yes, find all references isn't yet implemented in serve-d yet, so once that's implemented a few related features should be easier to implement