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

Calling Fourmolu via HLS infers wrong fixities #3421

Open
RobinStoll opened this issue Dec 22, 2022 · 1 comment
Open

Calling Fourmolu via HLS infers wrong fixities #3421

RobinStoll opened this issue Dec 22, 2022 · 1 comment
Assignees
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@RobinStoll
Copy link

When using Fourmolu as a formatter via HLS, it infers different fixities of binary operators than when calling Fourmolu directly via the command line. This happens regardless of whether HLS uses its built-in Fourmolu or calls an external one.

It happened with the following operators:

It is relatively easy to circumvent by specifying these fixities explicitly in fourmolu.yaml, but it is still a little annoying. It also took me a while to figure out why it was behaving differently.

Your environment

Which OS do you use?
openSUSE
Which LSP client (editor/plugin) do you use?
VS Code & Haskell extension
Which version of HLS do you use and how did you install it?
1.8.0.0 via ghcup via VS Code Haskell extension
Have you configured HLS in any way (especially: a hie.yaml file)?
Only via VS Code

@RobinStoll RobinStoll added status: needs triage type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. labels Dec 22, 2022
@georgefst
Copy link
Collaborator

See #3454.

Getting these working for non-CLI mode may require some upstream refactoring to expose the right functionality, similarly to #3449.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

3 participants