@@ -299,11 +299,6 @@ mkExtCompl label =
299
299
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
300
300
Nothing Nothing Nothing Nothing Nothing Nothing
301
301
302
- mkPragmaCompl :: T. Text -> T. Text -> CompletionItem
303
- mkPragmaCompl label insertText =
304
- CompletionItem label (Just CiKeyword ) Nothing Nothing
305
- Nothing Nothing Nothing Nothing Nothing (Just insertText) (Just Snippet )
306
- Nothing Nothing Nothing Nothing Nothing Nothing
307
302
308
303
fromIdentInfo :: Uri -> IdentInfo -> Maybe T. Text -> CompItem
309
304
fromIdentInfo doc IdentInfo {.. } q = CI
@@ -600,14 +595,7 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
600
595
, enteredQual `T.isPrefixOf` label
601
596
]
602
597
603
- filtListWithSnippet f list suffix =
604
- [ toggleSnippets caps config (f label (snippet <> suffix))
605
- | (snippet, label) <- list
606
- , Fuzzy. test fullPrefix label
607
- ]
608
-
609
598
filtImportCompls = filtListWith (mkImportCompl enteredQual) importableModules
610
- filtPragmaCompls = filtListWithSnippet mkPragmaCompl validPragmas
611
599
filtOptsCompls = filtListWith mkExtCompl
612
600
filtKeywordCompls
613
601
| T. null prefixModule = filtListWith mkExtCompl (optKeywords ideOpts)
@@ -628,8 +616,6 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
628
616
-> return []
629
617
| " {-# options_ghc" `T.isPrefixOf` T. toLower fullLine
630
618
-> return $ filtOptsCompls (map (T. pack . stripLeading ' -' ) $ flagsForCompletion False )
631
- | " {-# " `T.isPrefixOf` fullLine
632
- -> return $ filtPragmaCompls (pragmaSuffix fullLine)
633
619
| otherwise -> do
634
620
-- assumes that nubOrdBy is stable
635
621
let uniqueFiltCompls = nubOrdBy uniqueCompl filtCompls
@@ -655,21 +641,6 @@ uniqueCompl x y =
655
641
-- helper functions for pragmas
656
642
-- ---------------------------------------------------------------------
657
643
658
- validPragmas :: [(T. Text , T. Text )]
659
- validPragmas =
660
- [ (" LANGUAGE ${1:extension}" , " LANGUAGE" )
661
- , (" OPTIONS_GHC -${1:option}" , " OPTIONS_GHC" )
662
- , (" INLINE ${1:function}" , " INLINE" )
663
- , (" NOINLINE ${1:function}" , " NOINLINE" )
664
- , (" INLINABLE ${1:function}" , " INLINABLE" )
665
- , (" WARNING ${1:message}" , " WARNING" )
666
- , (" DEPRECATED ${1:message}" , " DEPRECATED" )
667
- , (" ANN ${1:annotation}" , " ANN" )
668
- , (" RULES" , " RULES" )
669
- , (" SPECIALIZE ${1:function}" , " SPECIALIZE" )
670
- , (" SPECIALIZE INLINE ${1:function}" , " SPECIALIZE INLINE" )
671
- ]
672
-
673
644
pragmaSuffix :: T. Text -> T. Text
674
645
pragmaSuffix fullLine
675
646
| " }" `T.isSuffixOf` fullLine = mempty
0 commit comments