File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ library
7171 , filepath
7272 , floskell == 0.10. *
7373 , ghc
74+ , ghc-boot-th
7475 , ghcide >= 0.1
7576 , gitrev
7677 , hashable
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Development.IDE.Types.Location
1919import qualified DynFlags as D
2020import qualified EnumSet as S
2121import GHC
22+ import GHC.LanguageExtensions.Type
2223import Ide.Types
2324import Ide.PluginUtils
2425import Ide.Plugin.Formatter
@@ -46,7 +47,7 @@ provider _lf ideState typ contents fp _ = do
4647 let p = D. sPgm_F $ D. settings df
4748 in if null p then [] else [" -pgmF=" <> p]
4849 pm = map ((" -fplugin=" <> ) . moduleNameString) $ D. pluginModNames df
49- ex = map (( " -X " <> ) . show ) $ S. toList $ D. extensionFlags df
50+ ex = map showExtension $ S. toList $ D. extensionFlags df
5051 in
5152 return $ map DynOption $ pp <> pm <> ex
5253
@@ -75,3 +76,7 @@ provider _lf ideState typ contents fp _ = do
7576 ret (Left err) = Left
7677 (responseError (T. pack $ " ormoluCmd: " ++ show err) )
7778 ret (Right new) = Right (makeDiffTextEdit contents new)
79+
80+ showExtension :: Extension -> String
81+ showExtension Cpp = " -XCPP"
82+ showExtension other = " -X" ++ show other
You can’t perform that action at this time.
0 commit comments