Re:EmacsConf 2020: State of Retro Gaming in Emacs
by simiones on Thursday November 26, 2020 @07:32AM
(#25219421)
PyCharm, like most IntelliJ IDEs, has excellent refactoring capabilities, much better than what LSP currently offers.
E.g. extract method, extract class, advanced navigation like "data flow to here" etc
They may not work in extremely dynamic Python code (e.g. they will obviously not work past an `exec`).
Re:EmacsConf 2020: State of Retro Gaming in Emacs
by disgruntledphd2 on Thursday November 26, 2020 @10:06AM
(#25220590)
This is the biggest flaw in LSP (for Python at least), right now.
How difficult is it to implement basic extract function/method functionality?
I'd be tempted to try doing it, as I would absolutely love to have this in Emacs.
Re:EmacsConf 2020: State of Retro Gaming in Emacs
by hirple on Thursday November 26, 2020 @04:08PM
(#25223538)
I'd be happy to help here too, let me know. I can try to hack some elisp together tomorrow.
Looks like rope would be a decent place to start.
Re:EmacsConf 2020: State of Retro Gaming in Emacs
by simiones on Friday November 27, 2020 @07:58AM
(#25228329)
I think some basic extract method has made it into lsp-mode or some enhancement, I have been seeing it for Go at least. That could serve as an inspiration.
I haven't honestly played around with it though to see if it successfully converts local variables to parameters/return values though, which would be the biggest time saver.
I'm a pretty poor PyCharm power-user, so wondering what I"m missing.