@@ -35,35 +35,38 @@ spec = do
35
35
-- formatRange doc (FormattingOptions 5 True) (Range (Position 4 0) (Position 7 19))
36
36
-- documentContents doc >>= liftIO . (`shouldBe` formattedRangeTabSize5)
37
37
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) }
42
42
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
46
46
47
- -- formatDoc doc (FormattingOptions 2 True)
48
- -- documentContents doc >>= liftIO . (`shouldBe` orig)
47
+ formatDoc doc (FormattingOptions 2 True )
48
+ documentContents doc >>= liftIO . (`shouldBe` orig)
49
49
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)
52
52
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"
55
55
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)
59
62
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)
63
66
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)
67
70
68
71
-- describe "brittany" $ do
69
72
-- it "formats a document with LF endings" $ runSession hieCommand fullCaps "test/testdata" $ do
0 commit comments