From f46c40c8435309eb190dfe337c4a756686c65929 Mon Sep 17 00:00:00 2001 From: Zubin Duggal Date: Fri, 5 Mar 2021 02:33:32 +0530 Subject: [PATCH] Register IDE configuration when called via the command line --- ghcide/src/Development/IDE/Main.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ghcide/src/Development/IDE/Main.hs b/ghcide/src/Development/IDE/Main.hs index 7a64527170..6327829a5a 100644 --- a/ghcide/src/Development/IDE/Main.hs +++ b/ghcide/src/Development/IDE/Main.hs @@ -26,6 +26,7 @@ import Development.IDE.Core.Service (initialise, runAction) import Development.IDE.Core.Shake (IdeState (shakeExtras), ShakeExtras (state), uses) import Development.IDE.Core.Tracing (measureMemory) +import Development.IDE.Core.IdeConfiguration (registerIdeConfiguration, IdeConfiguration(..)) import Development.IDE.LSP.LanguageServer (runLanguageServer) import Development.IDE.Plugin (Plugin (pluginHandlers, pluginRules)) import Development.IDE.Plugin.HLS (asGhcIdePlugin) @@ -61,6 +62,7 @@ import System.IO (hPutStrLn, hSetEncoding, stderr, stdout, utf8) import System.Time.Extra (offsetTime, showDuration) import Text.Printf (printf) +import Data.Hashable (hashed) data Arguments = Arguments { argsOTMemoryProfiling :: Bool @@ -170,6 +172,7 @@ defaultMain Arguments{..} = do , optCheckProject = pure False } ide <- initialise argsDefaultHlsConfig rules Nothing argsLogger debouncer options vfs hiedb hieChan + registerIdeConfiguration (shakeExtras ide) $ IdeConfiguration mempty (hashed Nothing) putStrLn "\nStep 4/4: Type checking the files" setFilesOfInterest ide $ HashMap.fromList $ map ((,OnDisk) . toNormalizedFilePath') files