pappasam / jedi-language-server

A Python language server exclusively for Jedi. If Jedi supports it well, this language server should too.
MIT License
617 stars 45 forks source link

Are move refactorings supported? #209

Open jgarte opened 2 years ago

jgarte commented 2 years ago

Hi,

Are move refactorings supported in jedi-language-server?

pappasam commented 2 years ago

Yes. If I understand that link correctly, PyCharm-style move refactorings are called "rename" in jedi-language-server (and all language servers, to that end).

jgarte commented 2 years ago

I was a bit confused on how to achieve this with eglot and emacs as I've used eglot-rename before to rename a variable but not to move a module to a different directory in the project's source tree and automatically rename all the imports. I'll give it another try in a dired buffer instead of a file buffer... Thanks for the clarification and help.

jgarte commented 2 years ago

@pappasam Hi, how can I test that this works in emacs with eglot. There is no documentation on how to run move refactorings but I would really like to start using them in Emacs. Any suggestions for how to debug this? I've had no luck so far. I tried using eglot-rename in a dired buffer with jedi-language-server but I get a "No current JSON-RPC connection" error because eglot is not usually active in an emacs dired buffer.