Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reformat "file" action on save doesn't reformat code #677

Open
gregbrowndev opened this issue Dec 24, 2021 · 0 comments
Open

Reformat "file" action on save doesn't reformat code #677

gregbrowndev opened this issue Dec 24, 2021 · 0 comments

Comments

@gregbrowndev
Copy link

gregbrowndev commented Dec 24, 2021

Hi there,

Firstly, thanks for this plugin. It is very helpful while learning Haskell.

I'm having difficulty using the plugin to reformat code on save. The issue is very similar to the one posted here: #284.

Just to confirm, I'm on a Mac and I can use the shortcut ⌥ ⌘ L to reformat a code fragment. This works as expected. However, I can't seem to get this to work with Actions on Save feature.

I think the problem is the plugin doesn't appear to have hooked up the Reformat file feature which uses the ⌥ ⇧ ⌘ L shortcut on a Mac. If I use this shortcut, nothing happens. I believe the Actions on Save to "reformat code" actually triggers reformat file rather than reformat code fragment.

image

As you can see in the image above, I also tried creating a File Watcher to run hindent on save. However, that produced undesirable results as the code would reformat as you are typing even with auto-save turned off. I think the issue was described here due to Live Edit triggering auto-save, but I don't know how the OP managed to turn it off. I only mention this as currently I don't have a good solution to reformat on save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant