Skip to content

Built-in fourmolu does not respect yaml settings, external fourmolu does not launch #3968

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

Open
tablitza opened this issue Jan 16, 2024 · 3 comments
Labels
component: formatters type: support User support tickets, questions, help with setup etc.

Comments

@tablitza
Copy link

Your environment

Which OS do you use?
Arch
Which version of GHC do you use and how did you install it?
GHC 9.4.8, HLS 2.5.0.0 via ghcup

Which LSP client (editor/plugin) do you use?
emacs+lsp-mode
Have you configured HLS in any way (especially: a hie.yaml file)? No.

What's wrong?

The built-in fourmolu plugin does not format code according to settings in yaml file. For instance, indentation parameter value has no impact at all. The yaml file does get loaded per the hls log file, and other parameters such as indent-wheres do in fact have an effect. When I switch to external plugin, I get the following error log:
Error | fourmolu: Internal Error: fourmolu: createProcess: posix_spawnp: does not exist (No such file or directory)
I installed fourmolu with cabal, it resides in ~/.cabal/bin which is on my PATH and launching it manually from terminal works.

@tablitza tablitza added status: needs triage type: support User support tickets, questions, help with setup etc. labels Jan 16, 2024
@michaelpj
Copy link
Collaborator

Is this #632 ?

@tablitza
Copy link
Author

Indeed, it appears that the bundled fourmolu responds to the value in emacs standard-indent variable instead of the yaml file. fwiw, it would be convenient if there was an option to toggle this behavior as different projects may have their their style guide preference. I'm still curious why external fourmolu doesn't work.

@mngrm3a
Copy link

mngrm3a commented Jun 8, 2024

The reexports setting is ignored as well but fixities is not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: formatters type: support User support tickets, questions, help with setup etc.
Projects
None yet
Development

No branches or pull requests

4 participants