atom-ide-purescript icon indicating copy to clipboard operation
atom-ide-purescript copied to clipboard

[suggestion] adding "rename module" and "add new module" functions

Open rvion opened this issue 8 years ago • 1 comments

few ideas :


module renaming

let's say you're in Foo.Bar.Baz module

rename Module would popup an input field containing Foo.Bar.Baz, with only Baz being selected.

Basically, changing Foo.Bar.Baz to Foo.Bar.Plop would

  1. check if Foo.Bar.Plop already exists
  2. move the file
  3. the module Foo.Bar.Baz where is changed to module Foo.Bar.Plop where
  4. all import statements the module Foo.Bar.Baz where would changed to Foo.Bar.Plop

📝 I have the impression that points 2. and 3. could be made easilly by just doing a mass rename of all Foo.Bar.Baz string occurences to Foo.Bar.Plop

it could also handle

  • folder change when Foo.Bar.Baz moves to Foo.Yolo
  • folder creation when Foo.Bar.Baz moves to Foo.Bar.Baz.Plop
  • module Merge when a module is renamed to an other existing module by copy pasting stuff from one module to the other.

module creation

let's say you're in Foo.Bar.Baz module

add module would just popup a input string containing Foo.Bar. etc.

rvion avatar Jul 19 '16 09:07 rvion

This is definitely not something I want to do without psc-ide support. @kRITZCREEK where do you think such issues should be tracked? I guess the main purescript repo I'm just hesitant of spamming with psc-ide issues.

nwolverson avatar Jul 19 '16 09:07 nwolverson