Description
Summary: Formatting via HLS moves my qualified
keywords as if I had the ImportQualifiedPost
plugin enabled, which I do not. Interestingly, this bug only seems to occur in projects using GHC 9.2.5?
Note that I've tried the standalone ormolu (0.5.1
) and this problem does not occur. I can't figure out how to check which version of ormolu my HLS is using, however...
Your environment
Which OS do you use?
Ubuntu 20.04
Which version of GHC do you use and how did you install it?
9.2.5, installed via stack.
NOTE: I tried this in an older project, using GHC 9.0.2 (also via stack), and the bug did NOT occur.
How is your project built (alternative: link to the project)?
stack
Which LSP client (editor/plugin) do you use?
Tried in neovim 0.8.2 and vs code 1.74.2 with same result.
Which version of HLS do you use and how did you install it?
HLS 1.9.0, via ghcup.
Have you configured HLS in any way (especially: a hie.yaml
file)?
No extra configs
Steps to reproduce
- Verify that
ImportQualifiedPost
is not enabled anywhere in the project - Add a qualified import
- Use HLS to format the file
Expected behaviour
The following import should remain as-is:
import qualified Data.Text as T
Actual behaviour
The import is altered, qualified
is moved:
import Data.Text qualified as T
Debug information
N/A