File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import qualified Data.Map.Strict as Map
2525import Data.Maybe (catMaybes , fromMaybe )
2626import qualified Data.Text as T
2727import Development.IDE
28+ import Development.IDE.Core.Shake (useWithStale )
2829import Development.IDE.GHC.Compat
2930import GHC.Generics (Generic )
3031import Ide.Plugin
@@ -84,11 +85,11 @@ provider _lspFuncs -- LSP functions, not used
8485 | Just nfp <- uriToNormalizedFilePath $ toNormalizedUri _uri
8586 = do
8687 -- Get the typechecking artifacts from the module
87- tmr <- runIde state $ use TypeCheck nfp
88+ tmr <- runIde state $ useWithStale TypeCheck nfp
8889 -- We also need a GHC session with all the dependencies
89- hsc <- runIde state $ use GhcSessionDeps nfp
90+ hsc <- runIde state $ useWithStale GhcSessionDeps nfp
9091 -- Use the GHC api to extract the "minimal" imports
91- (imports, mbMinImports) <- extractMinimalImports hsc tmr
92+ (imports, mbMinImports) <- extractMinimalImports ( fst <$> hsc) ( fst <$> tmr)
9293
9394 case mbMinImports of
9495 -- Implement the provider logic:
You can’t perform that action at this time.
0 commit comments