@@ -299,11 +299,6 @@ mkExtCompl label =
299299 Nothing Nothing Nothing Nothing Nothing Nothing Nothing
300300 Nothing Nothing Nothing Nothing Nothing Nothing
301301
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
307302
308303fromIdentInfo :: Uri -> IdentInfo -> Maybe T. Text -> CompItem
309304fromIdentInfo doc IdentInfo {.. } q = CI
@@ -600,14 +595,7 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
600595 , enteredQual `T.isPrefixOf` label
601596 ]
602597
603- filtListWithSnippet f list suffix =
604- [ toggleSnippets caps config (f label (snippet <> suffix))
605- | (snippet, label) <- list
606- , Fuzzy. test fullPrefix label
607- ]
608-
609598 filtImportCompls = filtListWith (mkImportCompl enteredQual) importableModules
610- filtPragmaCompls = filtListWithSnippet mkPragmaCompl validPragmas
611599 filtOptsCompls = filtListWith mkExtCompl
612600 filtKeywordCompls
613601 | T. null prefixModule = filtListWith mkExtCompl (optKeywords ideOpts)
@@ -628,8 +616,6 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
628616 -> return []
629617 | " {-# options_ghc" `T.isPrefixOf` T. toLower fullLine
630618 -> return $ filtOptsCompls (map (T. pack . stripLeading ' -' ) $ flagsForCompletion False )
631- | " {-# " `T.isPrefixOf` fullLine
632- -> return $ filtPragmaCompls (pragmaSuffix fullLine)
633619 | otherwise -> do
634620 -- assumes that nubOrdBy is stable
635621 let uniqueFiltCompls = nubOrdBy uniqueCompl filtCompls
@@ -655,21 +641,6 @@ uniqueCompl x y =
655641-- helper functions for pragmas
656642-- ---------------------------------------------------------------------
657643
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-
673644pragmaSuffix :: T. Text -> T. Text
674645pragmaSuffix fullLine
675646 | " }" `T.isSuffixOf` fullLine = mempty
0 commit comments