Closed jose-elias-alvarez closed 2 years ago
I like this because it is explicit.
Here's more refined version:
:TSLspMovePrepare
, it will save references:TSLspMoveDone
, it will open all buffers with references and run import code action on references, if there is more than one import option - it will use one which matches current file pathWhat do you think? :thinking:
I like it. If we require the user to specifically hover over the relevant const / function and declare that they are done, we could save multiple sets of references in state to allow moving multiple exports at the same time, too.
Which one you like better, this one or #46 ? :slightly_smiling_face:
I did this workflow manually for a few times this week. Opened reference list as a quickfix, moved function and fixed them one by one. Silly me. :grin:
I think we should implement them both, since I imagine we'd want this functionality to build on a more general "fix broken imports" function. Will hopefully have time to work on it this week.
Like the other issues I've been closing, this is a cool idea but should be implemented at the language server level. The whole point of the LSP specification is to make things like this editor-independent, so even though we could implement a Neovim-specific version, I'd rather put that effort into adding something that everyone can benefit from.
@non25 suggests a refactoring workflow where you could:
I think this would work well with #46 and #47.