stack-ide-sublime icon indicating copy to clipboard operation
stack-ide-sublime copied to clipboard

Format code on demand or upon saving

Open kerscher opened this issue 10 years ago • 4 comments

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 avatar Nov 15 '15 22:11 kerscher

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?

kerscher avatar Nov 26 '15 18:11 kerscher

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

rvion avatar Nov 26 '15 19:11 rvion

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!

lukexi avatar Nov 26 '15 21:11 lukexi

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

kerscher avatar Dec 02 '15 16:12 kerscher