From 48237d69374dd405cbce78ea8d20841c29efab48 Mon Sep 17 00:00:00 2001 From: Pepe Iborra Date: Sun, 24 Oct 2021 11:06:02 +0100 Subject: [PATCH] fix defaultIdeOptions It should use the default config settings for checkProject and checkParents --- ghcide/src/Development/IDE/Main.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ghcide/src/Development/IDE/Main.hs b/ghcide/src/Development/IDE/Main.hs index 1663a52f38..5f1defb027 100644 --- a/ghcide/src/Development/IDE/Main.hs +++ b/ghcide/src/Development/IDE/Main.hs @@ -86,7 +86,8 @@ import GHC.IO.Handle (hDuplicate) import HIE.Bios.Cradle (findCradle) import qualified HieDb.Run as HieDb import Ide.Plugin.Config (CheckParents (NeverCheck), - Config, + Config, checkParents, + checkProject, getConfigFromNotification) import Ide.Plugin.ConfigUtils (pluginsToDefaultConfig, pluginsToVSCodeExtensionSchema) @@ -193,7 +194,10 @@ defaultArguments priority = Arguments , argsGhcidePlugin = mempty , argsHlsPlugins = pluginDescToIdePlugins Ghcide.descriptors , argsSessionLoadingOptions = def - , argsIdeOptions = const defaultIdeOptions + , argsIdeOptions = \config ghcSession -> (defaultIdeOptions ghcSession) + { optCheckProject = pure $ checkProject config + , optCheckParents = pure $ checkParents config + } , argsLspOptions = def {LSP.completionTriggerCharacters = Just "."} , argsDefaultHlsConfig = def , argsGetHieDbLoc = getHieDbLoc