Skip to content

Commit

Permalink
fix empty list logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnaspo committed Aug 30, 2021
1 parent 3ea33e4 commit 630efd5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions ghcide/src/Development/IDE/Plugin/Completions/Logic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -604,14 +604,10 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
if
| "import " `T.isPrefixOf` fullLine
-> return filtImportCompls
-- we leave these condition here to avoid duplications and return empty list
-- we leave this condition here to avoid duplications and return empty list
-- since HLS implements these completions (#haskell-language-server/pull/662)
| "{-# options_ghc" `T.isPrefixOf` T.toLower fullLine
-> return []
| "{-# " `T.isPrefixOf` fullLine
-> return []
| "{-# language" `T.isPrefixOf` T.toLower fullLine
-> return []
| otherwise -> do
-- assumes that nubOrdBy is stable
let uniqueFiltCompls = nubOrdBy uniqueCompl filtCompls
Expand Down

0 comments on commit 630efd5

Please sign in to comment.