elm-language-server icon indicating copy to clipboard operation
elm-language-server copied to clipboard

Feature: Move function/type

Open jonathanmoregard opened this issue 4 years ago • 1 comments

Expected Behavior

When activating quickfix through the vscode command "editor.action.quickFix" while the cursor is on a function declaration or on a type declaration; I want the option to move that function/type to another file, automatically updating the import statements on all files where the function/type is used.

Current Behavior

No move action available on "quickFix"

Context

When refractoring big elm apps, sometimes I need to move functions between files, to keep a clear separation of concerns.

Right now, this is a lot of manual work, where I:

  1. cut the functiuon/type from module 1
  2. paste the function/type in module 2
  3. expose the function/type in module 2
  4. unexpose the function/type in module 1
  5. compile
  6. go through all import-errors one by one, adjusting the imports to point to module 2 instead of module 1

jonathanmoregard avatar Oct 23 '19 09:10 jonathanmoregard

Functions can be moved since march, types still need to be implemented

razzeee avatar Aug 28 '20 18:08 razzeee