Skip to content

Commit 3ea33e4

Browse files
committed
return empty list from logic completions when opts or pragma start
1 parent 02af464 commit 3ea33e4

File tree

1 file changed

+6
-2
lines changed
  • ghcide/src/Development/IDE/Plugin/Completions

1 file changed

+6
-2
lines changed

ghcide/src/Development/IDE/Plugin/Completions/Logic.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,12 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
604604
if
605605
| "import " `T.isPrefixOf` fullLine
606606
-> return filtImportCompls
607-
-- we leave this condition here to avoid duplications and return empty list
608-
-- since HLS implements this completion (#haskell-language-server/pull/662)
607+
-- we leave these condition here to avoid duplications and return empty list
608+
-- since HLS implements these completions (#haskell-language-server/pull/662)
609+
| "{-# options_ghc" `T.isPrefixOf` T.toLower fullLine
610+
-> return []
611+
| "{-# " `T.isPrefixOf` fullLine
612+
-> return []
609613
| "{-# language" `T.isPrefixOf` T.toLower fullLine
610614
-> return []
611615
| otherwise -> do

0 commit comments

Comments
 (0)