File tree Expand file tree Collapse file tree 5 files changed +72
-1
lines changed Expand file tree Collapse file tree 5 files changed +72
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ packages:
31
31
./plugins/hls-code-range-plugin
32
32
./plugins/hls-change-type-signature-plugin
33
33
./plugins/hls-stan-plugin
34
+ ./plugins/hls-ecta-plugin
34
35
./plugins/hls-gadt-plugin
35
36
./plugins/hls-explicit-fixity-plugin
36
37
./plugins/hls-refactor-plugin
Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ flag haddockComments
77
77
default : True
78
78
manual : True
79
79
80
+ flag ecta
81
+ description : Enable ecta plugin
82
+ default : True
83
+ manual : True
84
+
80
85
flag eval
81
86
description : Enable eval plugin
82
87
default : True
@@ -214,6 +219,11 @@ common haddockComments
214
219
build-depends : hls-haddock-comments-plugin ^>= 1.1
215
220
cpp-options : -Dhls_haddockComments
216
221
222
+ common ecta
223
+ if flag(ecta) && (impl(ghc < 9 ) || flag(ignore-plugins-ghc-bounds))
224
+ build-depends : hls-ecta-plugin
225
+ cpp-options : -Dhls_ecta
226
+
217
227
common eval
218
228
if flag(eval) && (impl(ghc < 9.4.1 ) || flag(ignore-plugins-ghc-bounds))
219
229
build-depends : hls-eval-plugin ^>= 1.3
@@ -270,7 +280,7 @@ common splice
270
280
cpp-options : -Dhls_splice
271
281
272
282
common alternateNumberFormat
273
- if flag(alternateNumberFormat)
283
+ if flag(alternateNumberFormat)
274
284
build-depends : hls-alternate-number-format-plugin ^>= 1.2
275
285
cpp-options : -Dhls_alternateNumberFormat
276
286
@@ -341,6 +351,7 @@ library
341
351
, changeTypeSignature
342
352
, class
343
353
, haddockComments
354
+ , ecta
344
355
, eval
345
356
, importLens
346
357
, refineImports
Original file line number Diff line number Diff line change
1
+ module Ide.Plugin.Ecta (descriptor ) where
2
+
3
+ import Development.IDE.GHC.Compat
4
+ import Development.IDE.GHC.Compat.Util
5
+ import qualified Ecta.Plugin as Ecta
6
+ import Ide.Types
7
+
8
+ descriptor :: Recorder (WithPriority Log ) -> PluginId -> PluginDescriptor IdeState
9
+ descriptor recorder pluginId = (defaultPluginDescriptor pluginId)
10
+ { pluginModifyDynflags = staticPlugin
11
+ }
12
+
13
+ staticPlugin :: DynFlagsModifications
14
+ staticPlugin = mempty
15
+ { dynFlagsModifyGlobal = \ df -> df
16
+ { staticPlugins = staticPlugins df <> [metaprogrammingPlugin]
17
+ }
18
+ }
19
+
20
+ ectaPlugin :: StaticPlugin
21
+ ectaPlugin = StaticPlugin $ PluginWithArgs Ecta. plugin []
Original file line number Diff line number Diff line change
1
+ cabal-version : 2.2
2
+ name : hls-ecta-plugin
3
+ version : 1.0
4
+ synopsis : Code synthesis for typed holes via ECTA
5
+ description :
6
+ Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
7
+ license : Apache-2.0
8
+ license-file : LICENSE
9
+ author : Pepe Iborra
10
+ maintainer : pepeiborra@gmail.com
11
+ category : Development
12
+ build-type : Simple
13
+ extra-source-files :
14
+ LICENSE
15
+
16
+ library
17
+ if impl(ghc > 8.9 ) && impl(ghc < 9.0 )
18
+ buildable : True
19
+ else
20
+ buildable : False
21
+ exposed-modules : Ide.Plugin.Ecta
22
+ hs-source-dirs : src
23
+ build-depends :
24
+ base >= 4.12 && < 5
25
+ , ecta
26
+ , ecta-plugin
27
+ , ghcide >= 1.8
28
+ , hls-graph
29
+ , hls-plugin-api >= 1.4
30
+
31
+ default-language : Haskell2010
Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ import qualified Ide.Plugin.Class as Class
29
29
import qualified Ide.Plugin.HaddockComments as HaddockComments
30
30
#endif
31
31
32
+ #if hls_ecta
33
+ import qualified Ide.Plugin.Ecta as Ecta
34
+ #endif
35
+
32
36
#if hls_eval
33
37
import qualified Ide.Plugin.Eval as Eval
34
38
#endif
@@ -173,6 +177,9 @@ idePlugins recorder = pluginDescToIdePlugins allPlugins
173
177
#if hls_haddockComments
174
178
HaddockComments. descriptor pluginRecorder " haddockComments" :
175
179
#endif
180
+ #if hls_ecta
181
+ Ecta. descriptor pluginRecorder " ecta" :
182
+ #endif
176
183
#if hls_eval
177
184
Eval. descriptor pluginRecorder " eval" :
178
185
#endif
You can’t perform that action at this time.
0 commit comments