Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit fa057ca

Browse files
committed
Exposing formatting providers to ormolu test suite
1 parent 1f6b1fc commit fa057ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/functional/FormatSpec.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ spec = do
9494

9595
-- Work in progress
9696
describe "ormolu" $ do
97+
let formatLspConfig provider =
98+
object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ]
99+
formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) }
100+
97101
it "formats correctly" $ runSession hieCommand fullCaps "test/testdata" $ do
98102
sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "ormolu"))
99103
doc <- openDoc "Format.hs" "haskell"

0 commit comments

Comments
 (0)