[LSP] Move refactoring reddit / emacs ---------------------------------------------------------------------- m-gregoire · 2022-07-01 11:33 Hello everyone, Today, I discovered a function of IntelliJ: "Move refactoring" (https://www.jetbrains.com/help/idea/move- refactorings.html#move_refactoring). In Golang for example, moving a folder inside a project will automatically update all reference to the package and modify all the necessary imports. Researching a bit, I found out this is probably a function of the LSP server. I found `lsp-rename` which allow renaming a function in the whole project but I couldn't find equivalent to the "Move refactoring" function of IntelliJ, which would allow moving a folder in one go. Is there anyway to achieve this in Emacs? Thank you! ---------------------------------------------------------------------- anaumann · 2022-07-01 11:48 For lsp-java, there's an open github issue since 2019 to allow for moving classes between packages(which is more or less the same thing).. And Microsoft's pyright server has only just gotten the simple refactor/rename functionality.. So it differs quite a bit between the different lsp implementations.. ---------------------------------------------------------------------- wargxs · 2022-07-01 12:34 Jetbrains does not use lsp, right? ---------------------------------------------------------------------- anaumann · 2022-07-01 12:51 Nope, but I think the OP is looking for a similar functionality in lsp :) ---------------------------------------------------------------------- wargxs · 2022-07-01 13:08 Ah I misunderstood, I thought he was assuming that it is a function of the IntelliJ lsp server ---------------------------------------------------------------------- rucci99 · 2022-07-01 13:23 gopls [doesn't support package renaming yet](https://github.com/golang/go/issues/41567). ---------------------------------------------------------------------- onetom · 2022-07-02 08:51 it sounded like that to me too. ---------------------------------------------------------------------- m-gregoire · 2022-07-04 07:30 Yes! Thank you for clarifying. ---------------------------------------------------------------------- m-gregoire · 2022-07-04 07:33 That was badly worded on my end indeed. I meant that I found that the LSP server specification defines something that resembles IntelliJ function, and wanted a way to reproduce it inside Emacs using the LSP server. ---------------------------------------------------------------------- m-gregoire · 2022-07-04 07:33 This is exactly what I was looking for, thank you for the reference! ---------------------------------------------------------------------- m-gregoire · 2022-07-04 07:34 Thank you for the explanation!