File tree 1 file changed +3
-2
lines changed
plugins/hls-hlint-plugin/src/Ide/Plugin
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
34
34
import qualified Data.Text.IO as T
35
35
import Data.Typeable
36
36
import Development.IDE
37
- import Development.IDE.Core.Rules (defineNoFile )
37
+ import Development.IDE.Core.Rules (getParsedModuleWithComments , defineNoFile )
38
38
import Development.IDE.Core.Shake (getDiagnostics )
39
39
40
40
#ifdef HLINT_ON_GHC_LIB
@@ -395,7 +395,7 @@ applyHint ide nfp mhint =
395
395
(Right <$> applyRefactorings Nothing commands temp refactExts)
396
396
`catches` errorHandlers
397
397
#else
398
- mbParsedModule <- liftIO $ runAction' $ getParsedModule nfp
398
+ mbParsedModule <- liftIO $ runAction' $ getParsedModuleWithComments nfp
399
399
res <-
400
400
case mbParsedModule of
401
401
Nothing -> throwE " Apply hint: error parsing the module"
@@ -404,6 +404,7 @@ applyHint ide nfp mhint =
404
404
let modu = pm_parsed_source pm
405
405
(modsum, _) <- liftIO $ runAction' $ use_ GetModSummary nfp
406
406
let dflags = ms_hspp_opts modsum
407
+ -- apply-refact uses RigidLayout
407
408
let rigidLayout = deltaOptions RigidLayout
408
409
(anns', modu') <-
409
410
ExceptT $ return $ postParseTransform (Right (anns, [] , dflags, modu)) rigidLayout
You can’t perform that action at this time.
0 commit comments