lukexi / stack-ide-sublime

An Sublime Text IDE for Haskell based on stack-ide
27 stars 5 forks source link

Format code on demand or upon saving #38

Open kerscher opened 8 years ago

kerscher commented 8 years ago

Whenever the user calls a Prettify this file command, it should be possible to run the file through stylish-haskell, updating the buffer immediately.

Optionally, the user could leave an option set on preferences that whenever the file is saved it first passes through prettification.

Currently I leave a watch program doing this whenever the file changes.

The only downside is that stylish-haskell has to be installed, though it is on LTS.

kerscher commented 8 years ago

I was planning on adding this, but since there is the additional dependency I might create a separate package just for this command and link to here for a proper IDE.

On a side-note, now that stack-ide is being deprecated, what are the plans for the package?

rvion commented 8 years ago

@kerscher are you aware of https://github.com/haskell/haskell-ide-engine ? This is probably the "future main backend" of all ide integrations :)

lukexi commented 8 years ago

Yep, I haven't kept up with how far along haskell-ide-engine is but I'm definitely planning to switch over to it as soon as it's ready to go!

kerscher commented 8 years ago

Thanks for the link @rvion, and for the heads-up @lukexi. I'll check the discussion there :)