From 558a3bce20a1fe2ca44049f804cf29911925750a Mon Sep 17 00:00:00 2001 From: George Thomas Date: Fri, 11 Mar 2022 10:35:10 +0000 Subject: [PATCH] Change flag name from "cli" to "external" --- plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs | 8 ++++---- plugins/hls-fourmolu-plugin/test/Main.hs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs b/plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs index c3266e564f..ea19ddf8f5 100644 --- a/plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs +++ b/plugins/hls-fourmolu-plugin/src/Ide/Plugin/Fourmolu.hs @@ -41,12 +41,12 @@ descriptor plId = { pluginHandlers = mkFormattingHandlers $ provider plId } -properties :: Properties '[ 'PropertyKey "cli" 'TBoolean] +properties :: Properties '[ 'PropertyKey "external" 'TBoolean] properties = emptyProperties & defineBooleanProperty - #cli - "Call out to a \"fourmolu\" executable, rather than using the bundled library" + #external + "Call out to an external \"fourmolu\" executable, rather than using the bundled library" False provider :: PluginId -> FormattingHandler IdeState @@ -54,7 +54,7 @@ provider plId ideState typ contents fp fo = withIndefiniteProgress title Cancell fileOpts <- maybe [] (convertDynFlags . hsc_dflags . hscEnv) <$> liftIO (runAction "Fourmolu" ideState $ use GhcSession fp) - useCLI <- usePropertyLsp #cli plId properties + useCLI <- usePropertyLsp #external plId properties if useCLI then liftIO . fmap (join . first (mkError . show)) diff --git a/plugins/hls-fourmolu-plugin/test/Main.hs b/plugins/hls-fourmolu-plugin/test/Main.hs index a78d5f479c..f339d716bc 100644 --- a/plugins/hls-fourmolu-plugin/test/Main.hs +++ b/plugins/hls-fourmolu-plugin/test/Main.hs @@ -33,7 +33,7 @@ tests = goldenWithFourmolu :: Bool -> TestName -> FilePath -> FilePath -> (TextDocumentIdentifier -> Session ()) -> TestTree goldenWithFourmolu cli title path desc = goldenWithHaskellDocFormatter fourmoluPlugin "fourmolu" conf title testDataDir path desc "hs" where - conf = def{plcConfig = (\(Object obj) -> obj) $ object ["cli" .= cli]} + conf = def{plcConfig = (\(Object obj) -> obj) $ object ["external" .= cli]} testDataDir :: FilePath testDataDir = "test" "testdata"