nboldi / haskell-tools-atom

An Atom editor binding for the Haskell-tools framework
7 stars 2 forks source link

Refactoring not working, but error message unclear #30

Closed buggymcbugfix closed 7 years ago

buggymcbugfix commented 7 years ago

I try renaming the definition of stuff and this happens:

screen shot 2017-06-12 at 19 17 25
nboldi commented 7 years ago

Before actually refactoring, you need to add your package to the engine. It can be done by right clicking the folder containing the haskell source file and selecting "Add to Haskell-tools". If you are developing a cabal package, you should add the folder containing your .cabal file.

buggymcbugfix commented 7 years ago

Thank you, this worked; but is this documented anywhere?

buggymcbugfix commented 7 years ago

I need to qualify what I said: I did find an option "Add to Haskell-tools". I still can't refactor anything though. It just says "Refactoring", but nothing happens. I wasn't sure whether to open a new issue.

nboldi commented 7 years ago

Interesting. Did you start the server before refactoring (Haskell/Start Server)? Did it show the messages in the status bar "Calculating" and "Ready"?

buggymcbugfix commented 7 years ago

Hmm. It never said "Ready". It stayed on "Calculating", even though the project just contained a single file with a single function.

nboldi commented 7 years ago

It is possible that another folder had been added but the client lost track of it. Please try the following:

  1. Start Atom
  2. Reset the Haskell-tools settings: Haskell/Factory Reset
  3. Add the folder to Haskell-tools with the one module you would like to refactor.
  4. Start the server
  5. Try the refactoring

If it does not work, please check if you can do the refactoring using the command line tool.