@@ -1354,6 +1354,11 @@ completionTests
13541354 , "Extract the first element of a list"
13551355#endif
13561356 ]
1357+ , testSessionWait "keyword" $ do
1358+ let source = T.unlines ["module A where", "f = newty"]
1359+ docId <- openDoc' "A.hs" "haskell" source
1360+ compls <- getCompletions docId (Position 1 9)
1361+ liftIO $ compls @?= [keywordItem "newtype"]
13571362 ]
13581363 where
13591364 dropDocs :: CompletionItem -> CompletionItem
@@ -1375,6 +1380,23 @@ completionTests
13751380 , _command = Nothing
13761381 , _xdata = Nothing
13771382 }
1383+ keywordItem label = CompletionItem
1384+ { _label = label
1385+ , _kind = Just CiKeyword
1386+ , _detail = Nothing
1387+ , _documentation = Nothing
1388+ , _deprecated = Nothing
1389+ , _preselect = Nothing
1390+ , _sortText = Nothing
1391+ , _filterText = Nothing
1392+ , _insertText = Nothing
1393+ , _insertTextFormat = Nothing
1394+ , _textEdit = Nothing
1395+ , _additionalTextEdits = Nothing
1396+ , _commitCharacters = Nothing
1397+ , _command = Nothing
1398+ , _xdata = Nothing
1399+ }
13781400 getDocText (CompletionDocString s) = s
13791401 getDocText (CompletionDocMarkup (MarkupContent _ s)) = s
13801402 checkDocText thing Nothing _