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
71
71
, filepath
72
72
, floskell == 0.10. *
73
73
, ghc
74
+ , ghc-boot-th
74
75
, ghcide >= 0.1
75
76
, gitrev
76
77
, hashable
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Development.IDE.Types.Location
19
19
import qualified DynFlags as D
20
20
import qualified EnumSet as S
21
21
import GHC
22
+ import GHC.LanguageExtensions.Type
22
23
import Ide.Types
23
24
import Ide.PluginUtils
24
25
import Ide.Plugin.Formatter
@@ -46,7 +47,7 @@ provider _lf ideState typ contents fp _ = do
46
47
let p = D. sPgm_F $ D. settings df
47
48
in if null p then [] else [" -pgmF=" <> p]
48
49
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
50
51
in
51
52
return $ map DynOption $ pp <> pm <> ex
52
53
@@ -75,3 +76,7 @@ provider _lf ideState typ contents fp _ = do
75
76
ret (Left err) = Left
76
77
(responseError (T. pack $ " ormoluCmd: " ++ show err) )
77
78
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