File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
plugins/hls-hlint-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import qualified Data.Text as T
3434import qualified Data.Text.IO as T
3535import Data.Typeable
3636import Development.IDE
37- import Development.IDE.Core.Rules (defineNoFile )
37+ import Development.IDE.Core.Rules (getParsedModuleWithComments , defineNoFile )
3838import Development.IDE.Core.Shake (getDiagnostics )
3939
4040#ifdef HLINT_ON_GHC_LIB
@@ -395,7 +395,7 @@ applyHint ide nfp mhint =
395395 (Right <$> applyRefactorings Nothing commands temp refactExts)
396396 `catches` errorHandlers
397397#else
398- mbParsedModule <- liftIO $ runAction' $ getParsedModule nfp
398+ mbParsedModule <- liftIO $ runAction' $ getParsedModuleWithComments nfp
399399 res <-
400400 case mbParsedModule of
401401 Nothing -> throwE " Apply hint: error parsing the module"
@@ -404,6 +404,7 @@ applyHint ide nfp mhint =
404404 let modu = pm_parsed_source pm
405405 (modsum, _) <- liftIO $ runAction' $ use_ GetModSummary nfp
406406 let dflags = ms_hspp_opts modsum
407+ -- apply-refact uses RigidLayout
407408 let rigidLayout = deltaOptions RigidLayout
408409 (anns', modu') <-
409410 ExceptT $ return $ postParseTransform (Right (anns, [] , dflags, modu)) rigidLayout
You can’t perform that action at this time.
0 commit comments