Skip to content

Calling Fourmolu via HLS infers wrong fixities #3421

Open
@RobinStoll

Description

@RobinStoll

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

Metadata

Metadata

Assignees

Labels

type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions