@@ -35,35 +35,38 @@ spec = do
3535 -- formatRange doc (FormattingOptions 5 True) (Range (Position 4 0) (Position 7 19))
3636 -- documentContents doc >>= liftIO . (`shouldBe` formattedRangeTabSize5)
3737
38- -- describe "formatting provider" $ do
39- -- let formatLspConfig provider =
40- -- object [ "languageServerHaskell" .= object ["formattingProvider" .= (provider :: Value)] ]
41- -- formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) }
38+ describe " formatting provider" $ do
39+ let formatLspConfig provider =
40+ object [ " languageServerHaskell" .= object [" formattingProvider" .= (provider :: Value )] ]
41+ formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) }
4242
43- -- it "respects none" $ runSessionWithConfig (formatConfig "none") hieCommand fullCaps "test/testdata" $ do
44- -- doc <- openDoc "Format.hs" "haskell"
45- -- orig <- documentContents doc
43+ it " respects none" $ runSessionWithConfig (formatConfig " none" ) hieCommand fullCaps " test/testdata" $ do
44+ doc <- openDoc " Format.hs" " haskell"
45+ orig <- documentContents doc
4646
47- -- formatDoc doc (FormattingOptions 2 True)
48- -- documentContents doc >>= liftIO . (`shouldBe` orig)
47+ formatDoc doc (FormattingOptions 2 True )
48+ documentContents doc >>= liftIO . (`shouldBe` orig)
4949
50- -- formatRange doc (FormattingOptions 2 True) (Range (Position 1 0) (Position 3 10))
51- -- documentContents doc >>= liftIO . (`shouldBe` orig)
50+ formatRange doc (FormattingOptions 2 True ) (Range (Position 1 0 ) (Position 3 10 ))
51+ documentContents doc >>= liftIO . (`shouldBe` orig)
5252
53- -- it "can change on the fly" $ runSession hieCommand fullCaps "test/testdata" $ do
54- -- doc <- openDoc "Format.hs" "haskell"
53+ it " can change on the fly" $ runSession hieCommand fullCaps " test/testdata" $ do
54+ doc <- openDoc " Format.hs" " haskell"
5555
56- -- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
57- -- formatDoc doc (FormattingOptions 2 True)
58- -- documentContents doc >>= liftIO . (`shouldBe` formattedDocTabSize2)
56+ sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " ormolu" ))
57+ formatDoc doc (FormattingOptions 2 True )
58+ documentContents doc >>= liftIO . (`shouldBe` formattedDocOrmolu)
59+ -- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
60+ -- formatDoc doc (FormattingOptions 2 True)
61+ -- documentContents doc >>= liftIO . (`shouldBe` formattedDocTabSize2)
5962
60- -- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "floskell"))
61- -- formatDoc doc (FormattingOptions 2 True)
62- -- documentContents doc >>= liftIO . (`shouldBe` formattedFloskell)
63+ sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " floskell" ))
64+ formatDoc doc (FormattingOptions 2 True )
65+ documentContents doc >>= liftIO . (`shouldBe` formattedFloskell)
6366
64- -- sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig "brittany"))
65- -- formatDoc doc (FormattingOptions 2 True)
66- -- documentContents doc >>= liftIO . (`shouldBe` formattedBrittanyPostFloskell)
67+ sendNotification WorkspaceDidChangeConfiguration (DidChangeConfigurationParams (formatLspConfig " brittany" ))
68+ formatDoc doc (FormattingOptions 2 True )
69+ documentContents doc >>= liftIO . (`shouldBe` formattedBrittanyPostFloskell)
6770
6871 -- describe "brittany" $ do
6972 -- it "formats a document with LF endings" $ runSession hieCommand fullCaps "test/testdata" $ do
0 commit comments