Description
This is a transfer of haskell/haskell-ide-engine#800 to haskell-language-server.
The essence of it is that we now have an expansion of plugins, and not all people want/like all the features.
Perhaps we should consider a regularisation of the Config
structure to have slots per plugin.
At the moment it has an ad-hoc set of setting, intimately tied to the "current" set of plugins.
data Config =
Config
{ hlintOn :: Bool
, diagnosticsOnChange :: Bool
, maxNumberOfProblems :: Int
, diagnosticsDebounceDuration :: Int
, liquidOn :: Bool
, completionSnippetsOn :: Bool
, formatOnImportOn :: Bool
, formattingProvider :: T.Text
} deriving (Show,Eq)
The configuration is the interface to the actual IDEs, and is transferred in JSON format.
One way forward would be to have a slot for plugins in the JSON configuration, which can be indexed by the plugin id, as configured in Main.hs
.
This could have a standard structure, to represent enabling/disabling code lenses, etc, as well as a per-plugin custom part, which becomes part of the PluginDescriptor
. By doing it this way we get a certain core amount of configuration for free, and allow a composable per-plugin configuration.
This is purely conceptual at this point, I invite anyone to make a concrete PR, if we agree this is a good thing to do.