@@ -28,7 +28,7 @@ import qualified Data.Text as T
28
28
import Development.IDE.Core.Rules
29
29
import Development.IDE.Core.Shake
30
30
import Development.IDE.LSP.Server
31
- import Development.IDE.Plugin hiding (pluginCommands , pluginRules )
31
+ import Development.IDE.Plugin hiding (pluginRules )
32
32
import Development.IDE.Types.Diagnostics as D
33
33
import Development.IDE.Types.Logger
34
34
import Development.Shake hiding ( Diagnostic , command )
@@ -89,12 +89,12 @@ allLspCmdIds' pid mp = mkPlugin (allLspCmdIds pid) (Just . pluginCommands)
89
89
-- ---------------------------------------------------------------------
90
90
91
91
rulesPlugins :: [(PluginId , Rules () )] -> Plugin Config
92
- rulesPlugins rs = Plugin mempty rules mempty
92
+ rulesPlugins rs = Plugin rules mempty
93
93
where
94
94
rules = mconcat $ map snd rs
95
95
96
96
codeActionPlugins :: [(PluginId , CodeActionProvider )] -> Plugin Config
97
- codeActionPlugins cas = Plugin mempty codeActionRules (codeActionHandlers cas)
97
+ codeActionPlugins cas = Plugin codeActionRules (codeActionHandlers cas)
98
98
99
99
codeActionRules :: Rules ()
100
100
codeActionRules = mempty
@@ -152,7 +152,7 @@ data FallbackCodeActionParams =
152
152
-- -----------------------------------------------------------
153
153
154
154
codeLensPlugins :: [(PluginId , CodeLensProvider )] -> Plugin Config
155
- codeLensPlugins cas = Plugin mempty codeLensRules (codeLensHandlers cas)
155
+ codeLensPlugins cas = Plugin codeLensRules (codeLensHandlers cas)
156
156
157
157
codeLensRules :: Rules ()
158
158
codeLensRules = mempty
@@ -192,7 +192,7 @@ makeCodeLens cas _lf ideState params = do
192
192
-- -----------------------------------------------------------
193
193
194
194
executeCommandPlugins :: [(PluginId , [PluginCommand ])] -> Plugin Config
195
- executeCommandPlugins ecs = Plugin mempty mempty (executeCommandHandlers ecs)
195
+ executeCommandPlugins ecs = Plugin mempty (executeCommandHandlers ecs)
196
196
197
197
executeCommandHandlers :: [(PluginId , [PluginCommand ])] -> PartialHandlers Config
198
198
executeCommandHandlers ecs = PartialHandlers $ \ WithMessage {.. } x -> return x{
@@ -370,7 +370,7 @@ allLspCmdIds pid commands = concat $ map go commands
370
370
-- ---------------------------------------------------------------------
371
371
372
372
hoverPlugins :: [(PluginId , HoverProvider )] -> Plugin Config
373
- hoverPlugins hs = Plugin mempty hoverRules (hoverHandlers hs)
373
+ hoverPlugins hs = Plugin hoverRules (hoverHandlers hs)
374
374
375
375
hoverRules :: Rules ()
376
376
hoverRules = mempty
@@ -403,8 +403,7 @@ makeHover hps _lf ideState params
403
403
404
404
formatterPlugins :: [(PluginId , FormattingProvider IO )] -> Plugin Config
405
405
formatterPlugins providers
406
- = Plugin mempty
407
- formatterRules
406
+ = Plugin formatterRules
408
407
(formatterHandlers (Map. fromList ((" none" ,noneProvider): providers)))
409
408
410
409
formatterRules :: Rules ()
0 commit comments