diff --git a/hls-module-name-plugin.cabal b/hls-module-name-plugin.cabal
--- a/hls-module-name-plugin.cabal
+++ b/hls-module-name-plugin.cabal
@@ -1,6 +1,6 @@
 cabal-version:      2.4
 name:               hls-module-name-plugin
-version:            1.0.1.0
+version:            1.0.2.0
 synopsis:           Module name plugin for Haskell Language Server
 description:
   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -25,8 +25,8 @@
     , base                  >=4.12 && <5
     , directory
     , filepath
-    , ghcide                ^>=1.6
-    , hls-plugin-api        ^>=1.3
+    , ghcide                ^>=1.7
+    , hls-plugin-api        ^>=1.4
     , lsp
     , text
     , transformers
@@ -44,4 +44,4 @@
     , base
     , filepath
     , hls-module-name-plugin
-    , hls-test-utils          ^>=1.2
+    , hls-test-utils          ^>=1.3
diff --git a/src/Ide/Plugin/ModuleName.hs b/src/Ide/Plugin/ModuleName.hs
--- a/src/Ide/Plugin/ModuleName.hs
+++ b/src/Ide/Plugin/ModuleName.hs
@@ -36,7 +36,7 @@
 import           Development.IDE.GHC.Compat (GenLocated (L), getSessionDynFlags,
                                              hsmodName, importPaths, locA,
                                              pattern RealSrcSpan,
-                                             pm_parsed_source, unLoc)
+                                             pm_parsed_source, unLoc, moduleNameString)
 import           Ide.Types
 import           Language.LSP.Server
 import           Language.LSP.Types         hiding
@@ -140,7 +140,7 @@
 codeModuleName state nfp = runMaybeT $ do
   pm <- MaybeT . runAction "ModuleName.GetParsedModule" state $ use GetParsedModule nfp
   L (locA -> (RealSrcSpan l _)) m <- MaybeT . pure . hsmodName . unLoc $ pm_parsed_source pm
-  pure (realSrcSpanToRange l, T.pack $ show m)
+  pure (realSrcSpanToRange l, T.pack $ moduleNameString m)
 
 -- traceAs :: Show a => String -> a -> a
 -- traceAs lbl a = trace (lbl ++ " = " ++ show a) a
diff --git a/test/Main.hs b/test/Main.hs
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -37,6 +37,12 @@
       [CodeLens { _command = Just c }] <- getCodeLenses doc
       executeCommand c
       void $ skipManyTill anyMessage (message SWorkspaceApplyEdit)
+  , testCase "Should not show code lens if the module name is correct" $
+      runSessionWithServer moduleNamePlugin testDataDir $ do
+          doc <- openDoc "CorrectName.hs" "haskell"
+          lenses <- getCodeLenses doc
+          liftIO $ lenses @?= []
+          closeDoc doc
   ]
 
 goldenWithModuleName :: TestName -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree
diff --git a/test/testdata/CorrectName.hs b/test/testdata/CorrectName.hs
new file mode 100644
--- /dev/null
+++ b/test/testdata/CorrectName.hs
@@ -0,0 +1,1 @@
+module CorrectName where
diff --git a/test/testdata/hie.yaml b/test/testdata/hie.yaml
--- a/test/testdata/hie.yaml
+++ b/test/testdata/hie.yaml
@@ -5,3 +5,4 @@
       - "TEmptyModule"
       - "TWrongModuleName"
       - "mainlike"
+      - "CorrectName"
