Closed aryairani closed 2 years ago
Do you mean that when you tried moving
{- ORMOLU_DISABLE -}
below the imports, ormolu still didn't format the imports?Yes, that's what I observed, but didn't dig into why that's the case (it didn't seem super important)
I'm observing the same (in vscode); kind of frustrating that the auto-formatter doesn't auto-format!
% ormolu parser-typechecker/src/Unison/Codebase/SqliteCodebase.hs
parser-typechecker/src/Unison/Codebase/SqliteCodebase.hs
AST of input and AST of formatted code differ.
Please, consider reporting the bug.
%
I alo get this error when I try formatting it manually, under various scenarios, I think it's related to the above.
It has something to do with {- ORMOLU_DISABLE -}
, as auto-formatting in the IDE and at the command-line work without it.
Adding {- ORMOLU_ENABLE -}
doesn't obviously help.
I reported this upstream; here's a workaround in the meantime: https://github.com/tweag/ormolu/issues/856#issuecomment-1007982154
It is expected to, just without comments on the same line as the DISABLE
directive.
See https://github.com/unisonweb/unison/pull/2713/files#r765360035
Towards #2666, #1760