atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor

Home Page:https://atom.io/packages/ide-haskell

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Styling code asks for re-save

varosi opened this issue · comments

Steps to reproduce

  1. Change the code so it needs restyling by stylish-haskell (add some import)
  2. Ctrl + S to Save the file
  3. File is restyled and asks for second save

It'll be good on Ctrl + S (Save) to save the restyled version and don't ask for second save. And the build/ghc-mod/HLint processes to start over restyled version and not the intermediate.

Windows 10 x64 and ide-haskell 1.9.6 plug-in and Atom 1.16.0

I use HIndent and experience the same behavior, but I don't think this is an issue. Sometimes prettifyer does some unexpected things :) So I'm pleased to be able to undo the changes that it made.

Windows 7 x64, ide-haskell 1.9.6, Atom 1.17.2

It's good to be a undoable, but this should be ortogonal to saving.

Since v2.0.3, ide-haskell should automatically re-save file after prettifying. It's not an ideal solution, but Atom doesn't allow to defer saving until some async action finishes, and running external program in sync doesn't sound like a particularly good idea, even were it not a challenge (and it is)