We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b15508a + 9c3037b commit 7b6efe8Copy full SHA for 7b6efe8
src/Ide/Plugin.hs
@@ -72,8 +72,13 @@ asGhcIdePlugin mp =
72
ls = Map.toList (ipMap mp)
73
74
mkPlugin :: ([(PluginId, b)] -> Plugin Config) -> (PluginDescriptor -> Maybe b) -> Plugin Config
75
- mkPlugin maker selector
76
- = maker $ concatMap (\(pid, p) -> justs (pid, selector p)) ls
+ mkPlugin maker selector =
+ case concatMap (\(pid, p) -> justs (pid, selector p)) ls of
77
+ -- If there are no plugins that provide a descriptor, use mempty to
78
+ -- create the plugin – otherwise we we end up declaring handlers for
79
+ -- capabilities that there are no plugins for
80
+ [] -> mempty
81
+ xs -> maker xs
82
83
84
pluginDescToIdePlugins :: [PluginDescriptor] -> IdePlugins
0 commit comments