Skip to content

Feature: Move function/type #194

@jonathanmoregard

Description

@jonathanmoregard

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions