Skip to content

Commit 822ff33

Browse files
committed
fix defaultIdeOptions
It should use the default config settings for checkProject and checkParents
1 parent d44a706 commit 822ff33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ghcide/src/Development/IDE/Main.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ import GHC.IO.Handle (hDuplicate)
8686
import HIE.Bios.Cradle (findCradle)
8787
import qualified HieDb.Run as HieDb
8888
import Ide.Plugin.Config (CheckParents (NeverCheck),
89-
Config,
89+
Config, checkParents,
90+
checkProject,
9091
getConfigFromNotification)
9192
import Ide.Plugin.ConfigUtils (pluginsToDefaultConfig,
9293
pluginsToVSCodeExtensionSchema)
@@ -193,7 +194,10 @@ defaultArguments priority = Arguments
193194
, argsGhcidePlugin = mempty
194195
, argsHlsPlugins = pluginDescToIdePlugins Ghcide.descriptors
195196
, argsSessionLoadingOptions = def
196-
, argsIdeOptions = const defaultIdeOptions
197+
, argsIdeOptions = \config ghcSession -> (defaultIdeOptions ghcSession)
198+
{ optCheckProject = pure $ checkProject config
199+
, optCheckParents = pure $ checkParents config
200+
}
197201
, argsLspOptions = def {LSP.completionTriggerCharacters = Just "."}
198202
, argsDefaultHlsConfig = def
199203
, argsGetHieDbLoc = getHieDbLoc

0 commit comments

Comments
 (0)