Is there a neovim interface to do refactorings like moving a namespace?
I quite often start out working with one file, get something working, maybe add a few tests and a few usages to my nice new namespace.
Then I realize I should go from my single pizza.clj file to pizza/toppings.clj , pizza/ordering.clj and so on, and I would like a smooth refactoring experience to do this.
Any advice?
Looks like clojure-lsp has support for this https://github.com/clojure-lsp/clojure-lsp/pull/1123. I think it's done through textDocument/rename.
if you just want to rename the namespace updating all usages, then LSP rename is the way and works pretty well, if you wanna manually move a function to another ns, you have move-form command but it's pretty experimental yet
vim-iced can do some sorts of refactoring: https://liquidz.github.io/vim-iced/#refactoring
@ericdallo Should there be a move-form code action when your cursor is on a function definition? I am using version 2022.12.09-15.51.10 and don't see it under code actions.
Not yet, the feature is available only via commands, it doesn't support some cases yet, there is a issue open to support other cases but there are too many corner cases