@@ -29,8 +29,8 @@ tests = testGroup "completions" [
29
29
item ^. label @?= " putStrLn"
30
30
item ^. kind @?= Just CiFunction
31
31
item ^. detail @?= Just " :: String -> IO ()"
32
- item ^. insertTextFormat @?= Just PlainText
33
- item ^. insertText @?= Nothing
32
+ item ^. insertTextFormat @?= Just Snippet
33
+ item ^. insertText @?= Just " putStrLn ${1:String} "
34
34
35
35
, ignoreTestBecause " no support for itemCompletion/resolve requests"
36
36
$ testCase " itemCompletion/resolve works" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
@@ -105,8 +105,8 @@ tests = testGroup "completions" [
105
105
liftIO $ do
106
106
item ^. label @?= " LANGUAGE"
107
107
item ^. kind @?= Just CiKeyword
108
- item ^. insertTextFormat @?= Just PlainText
109
- item ^. insertText @?= Nothing
108
+ item ^. insertTextFormat @?= Just Snippet
109
+ item ^. insertText @?= Just " LANGUAGE ${1:extension} #-} "
110
110
111
111
, testCase " completes pragmas no close" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
112
112
doc <- openDoc " Completion.hs" " haskell"
@@ -120,8 +120,8 @@ tests = testGroup "completions" [
120
120
liftIO $ do
121
121
item ^. label @?= " LANGUAGE"
122
122
item ^. kind @?= Just CiKeyword
123
- item ^. insertTextFormat @?= Just PlainText
124
- item ^. insertText @?= Nothing
123
+ item ^. insertTextFormat @?= Just Snippet
124
+ item ^. insertText @?= Just " LANGUAGE ${1:extension} "
125
125
126
126
, testCase " completes options pragma" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
127
127
doc <- openDoc " Completion.hs" " haskell"
@@ -135,8 +135,8 @@ tests = testGroup "completions" [
135
135
liftIO $ do
136
136
item ^. label @?= " OPTIONS_GHC"
137
137
item ^. kind @?= Just CiKeyword
138
- item ^. insertTextFormat @?= Just PlainText
139
- item ^. insertText @?= Nothing
138
+ item ^. insertTextFormat @?= Just Snippet
139
+ item ^. insertText @?= Just " OPTIONS_GHC -${1:option} #-} "
140
140
141
141
, testCase " completes ghc options pragma values" $ runSession hlsCommand fullCaps " test/testdata/completion" $ do
142
142
doc <- openDoc " Completion.hs" " haskell"
0 commit comments