diff --git a/hls-refine-imports-plugin.cabal b/hls-refine-imports-plugin.cabal
--- a/hls-refine-imports-plugin.cabal
+++ b/hls-refine-imports-plugin.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               hls-refine-imports-plugin
-version:            1.0.0.1
+version:            1.0.0.2
 synopsis:           Refine imports plugin for Haskell Language Server
 description:
   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -24,7 +24,7 @@
     , containers
     , deepseq
     , ghc
-    , ghcide                       ^>=1.4
+    , ghcide                       ^>=1.4 || ^>=1.5
     , hls-explicit-imports-plugin  ^>=1.0.0.1
     , hls-graph
     , hls-plugin-api               >=1.1     && <1.3
diff --git a/src/Ide/Plugin/RefineImports.hs b/src/Ide/Plugin/RefineImports.hs
--- a/src/Ide/Plugin/RefineImports.hs
+++ b/src/Ide/Plugin/RefineImports.hs
@@ -9,9 +9,6 @@
 
 module Ide.Plugin.RefineImports (descriptor) where
 
-import           Avail                                (AvailInfo (Avail),
-                                                       availName, availNames,
-                                                       availNamesWithSelectors)
 import           Control.Arrow                        (Arrow (second))
 import           Control.DeepSeq                      (rwhnf)
 import           Control.Monad                        (join)
@@ -27,7 +24,8 @@
 import           Data.Traversable                     (forM)
 import           Development.IDE
 import           Development.IDE.Core.PositionMapping
-import           Development.IDE.GHC.Compat           (AvailInfo,
+import           Development.IDE.GHC.Compat
+                                                      {- (AvailInfo,
                                                        GenLocated (L), GhcRn,
                                                        HsModule (hsmodImports),
                                                        ImportDecl (ImportDecl, ideclHiding, ideclName),
@@ -35,9 +33,10 @@
                                                        Module (moduleName),
                                                        ModuleName,
                                                        ParsedModule (ParsedModule, pm_parsed_source),
-                                                       SrcSpan (RealSrcSpan),
+                                                       SrcSpan(..),
+                                                       RealSrcSpan(..),
                                                        getLoc, ieName, noLoc,
-                                                       tcg_exports, unLoc)
+                                                       tcg_exports, unLoc) -}
 import           Development.IDE.Graph.Classes
 import           GHC.Generics                         (Generic)
 import           Ide.Plugin.ExplicitImports           (extractMinimalImports,
@@ -46,12 +45,6 @@
 import           Ide.Types
 import           Language.LSP.Server
 import           Language.LSP.Types
-import           PrelNames                            (pRELUDE)
-import           RnNames                              (findImportUsage,
-                                                       getMinimalImports)
-import           TcRnMonad                            (initTcWithGbl,
-                                                       tcg_rn_exports,
-                                                       tcg_used_gres)
 
 -- | plugin declaration
 descriptor :: PluginId -> PluginDescriptor IdeState
@@ -162,7 +155,6 @@
 
 instance Hashable RefineImports
 instance NFData RefineImports
-instance Binary RefineImports
 type instance RuleResult RefineImports = RefineImportsResult
 
 newtype RefineImportsResult = RefineImportsResult
@@ -257,7 +249,7 @@
 
 mkExplicitEdit :: PositionMapping -> LImportDecl pass -> T.Text -> Maybe TextEdit
 mkExplicitEdit posMapping (L src imp) explicit
-  | RealSrcSpan l <- src,
+  | RealSrcSpan l _ <- src,
     L _ mn <- ideclName imp,
     -- (almost) no one wants to see an refine import list for Prelude
     mn /= moduleName pRELUDE,
