File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ import TestUtils
11
11
12
12
spec :: Spec
13
13
spec = do
14
+ let formatLspConfig provider =
15
+ object [ " languageServerHaskell" .= object [" formattingProvider" .= (provider :: Value )] ]
16
+ formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) }
14
17
describe " format document" $ do
15
18
it " works" $ runSession hieCommand fullCaps " test/testdata" $ do
16
19
doc <- openDoc " Format.hs" " haskell"
@@ -36,10 +39,6 @@ spec = do
36
39
-- documentContents doc >>= liftIO . (`shouldBe` formattedRangeTabSize5)
37
40
38
41
describe " formatting provider" $ do
39
- let formatLspConfig provider =
40
- object [ " languageServerHaskell" .= object [" formattingProvider" .= (provider :: Value )] ]
41
- formatConfig provider = defaultConfig { lspConfig = Just (formatLspConfig provider) }
42
-
43
42
it " respects none" $ runSessionWithConfig (formatConfig " none" ) hieCommand fullCaps " test/testdata" $ do
44
43
doc <- openDoc " Format.hs" " haskell"
45
44
orig <- documentContents doc
@@ -177,7 +176,7 @@ formattedDocTabSize5 =
177
176
formattedRangeTabSize2 :: T. Text
178
177
formattedRangeTabSize2 =
179
178
" {-# LANGUAGE NoImplicitPrelude #-}\n \
180
- \module Format where\n \
179
+ \module Format where\n \n \
181
180
\foo :: Int -> Int\n \
182
181
\foo 3 = 2\n \
183
182
\foo x = x\n \
You can’t perform that action at this time.
0 commit comments