jeapostrophe / racket-langserver

Other
269 stars 24 forks source link

Provide textDocument/rename and prepareRename #42

Closed Runi-c closed 3 years ago

Runi-c commented 3 years ago

Effective and expected renaming support. Until more workspace support is added, prepareRename rejects any rename requests for symbols not defined in the current file. Leads to more expected behavior than DrRacket in some cases.

https://user-images.githubusercontent.com/5150427/113500185-44527200-94d9-11eb-8257-1e615d3f731a.mp4

Also includes a few other improvements and fixes, such as a fix to signature & autocompletion providing while writing new code and some improvements to trigger characters for certain methods.

jackfirth commented 3 years ago

Does this work with things that use 'sub-range-binders, like struct fields?

Runi-c commented 3 years ago

@jackfirth I didn't even think to try, but it does! It uses the binding information provided by DrRacket's arrow system, so anything supported by that should work as expected with renaming.

https://user-images.githubusercontent.com/5150427/113500656-fa6b8b00-94dc-11eb-88f2-4ea8a9765a40.mp4

jeapostrophe commented 3 years ago

Awesome!