Skip to content

Commit f53cc5a

Browse files
committed
clean up
1 parent dcfdbfc commit f53cc5a

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ getCompletionsLSP ide plId
146146
let compls = (fst <$> localCompls) <> (fst <$> nonLocalCompls) <> Just exportsCompls
147147
pure (opts, fmap (,pm,binds) compls, moduleExports)
148148
case compls of
149-
(Just (cci', parsedMod, bindMap)) -> do
149+
Just (cci', parsedMod, bindMap) -> do
150150
pfix <- VFS.getCompletionPrefix position cnts
151151
case (pfix, completionContext) of
152152
(Just (VFS.PosPrefixInfo _ "" _ _), Just CompletionContext { _triggerCharacter = Just "."})

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

+2-6
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import Development.IDE.Spans.LocalBindings
5555
import Development.IDE.Types.Exports
5656
import Development.IDE.Types.HscEnvEq
5757
import Development.IDE.Types.Options
58-
import GhcPlugins (flLabel, unpackFS, lookupWithDefaultUFM)
58+
import GhcPlugins (flLabel, unpackFS)
5959
import Ide.PluginUtils (mkLspCommand)
6060
import Ide.Types (CommandId (..),
6161
PluginId)
@@ -65,7 +65,6 @@ import qualified Language.LSP.VFS as VFS
6565
import Outputable (Outputable)
6666
import TyCoRep
6767

68-
6968
-- From haskell-ide-engine/hie-plugin-api/Haskell/Ide/Engine/Context.hs
7069

7170
-- | A context of a declaration in the program
@@ -287,7 +286,6 @@ mkModCompl label =
287286
Nothing Nothing Nothing Nothing Nothing Nothing Nothing
288287
Nothing Nothing Nothing Nothing Nothing Nothing
289288

290-
291289
mkModuleFunctionImport :: T.Text -> T.Text -> CompletionItem
292290
mkModuleFunctionImport moduleName label =
293291
CompletionItem label (Just CiFunction) Nothing (Just moduleName)
@@ -638,8 +636,7 @@ getCompletions plId ideOpts CC {allModNamesAsNS, anyQualCompls, unqualCompls, qu
638636
funcs = HM.findWithDefault [] (T.pack moduleName) exportsMap
639637
return (map (mkModuleFunctionImport (T.pack moduleName)) funcs)
640638
| "import " `T.isPrefixOf` fullLine
641-
-> do
642-
return filtImportCompls
639+
-> return filtImportCompls
643640
-- we leave this condition here to avoid duplications and return empty list
644641
-- since HLS implements this completion (#haskell-language-server/pull/662)
645642
| "{-# language" `T.isPrefixOf` T.toLower fullLine
@@ -669,7 +666,6 @@ uniqueCompl x y =
669666
then EQ
670667
else compare (insertText x) (insertText y)
671668
other -> other
672-
673669
-- ---------------------------------------------------------------------
674670
-- helper functions for pragmas
675671
-- ---------------------------------------------------------------------

0 commit comments

Comments
 (0)