diff --git a/hls-ormolu-plugin.cabal b/hls-ormolu-plugin.cabal
--- a/hls-ormolu-plugin.cabal
+++ b/hls-ormolu-plugin.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               hls-ormolu-plugin
-version:            1.0.1.2
+version:            1.0.2.0
 synopsis:           Integration with the Ormolu code formatter
 description:
   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -24,11 +24,11 @@
     , filepath
     , ghc
     , ghc-boot-th
-    , ghcide          ^>=1.5.0
-    , hls-plugin-api  >=1.1   && <1.3
+    , ghcide          ^>=1.6
+    , hls-plugin-api  ^>=1.3
     , lens
     , lsp
-    , ormolu          ^>=0.1.2 || ^>= 0.2 || ^>= 0.3
+    , ormolu          ^>=0.1.2 || ^>= 0.2 || ^>= 0.3 || ^>= 0.4
     , text
 
   default-language: Haskell2010
@@ -43,5 +43,5 @@
     , base
     , filepath
     , hls-ormolu-plugin
-    , hls-test-utils     >=1.0 && <1.2
+    , hls-test-utils     ^>=1.2
     , lsp-types
diff --git a/src/Ide/Plugin/Ormolu.hs b/src/Ide/Plugin/Ormolu.hs
--- a/src/Ide/Plugin/Ormolu.hs
+++ b/src/Ide/Plugin/Ormolu.hs
@@ -11,7 +11,7 @@
 import           Control.Monad.IO.Class          (liftIO)
 import qualified Data.Text                       as T
 import           Development.IDE                 hiding (pluginHandlers)
-import           Development.IDE.GHC.Compat      (moduleNameString, hsc_dflags)
+import           Development.IDE.GHC.Compat      (hsc_dflags, moduleNameString)
 import qualified Development.IDE.GHC.Compat      as D
 import qualified Development.IDE.GHC.Compat.Util as S
 import           GHC.LanguageExtensions.Type
@@ -50,7 +50,7 @@
   case typ of
     FormatText -> ret <$> fmt contents (mkConf fileOpts fullRegion)
     FormatRange (Range (Position sl _) (Position el _)) ->
-      ret <$> fmt contents (mkConf fileOpts (rangeRegion sl el))
+      ret <$> fmt contents (mkConf fileOpts (rangeRegion (fromIntegral sl) (fromIntegral el)))
  where
    title = T.pack $ "Formatting " <> takeFileName (fromNormalizedFilePath fp)
 
