@@ -200,6 +200,7 @@ instance Default Config where
200
200
-- , formattingProvider = "floskell"
201
201
-- , formattingProvider = "stylish-haskell"
202
202
, cabalFormattingProvider = " cabal-fmt"
203
+ -- this string value needs to kept in sync with the value provided in HlsPlugins
203
204
, maxCompletions = 40
204
205
, plugins = mempty
205
206
}
@@ -344,38 +345,38 @@ defaultConfigDescriptor =
344
345
class HasTracing (MessageParams m ) => PluginMethod (k :: MethodType ) (m :: Method FromClient k ) where
345
346
346
347
-- | Parse the configuration to check if this plugin is enabled.
347
- -- Perform sanity checks on the message to see whether plugin is enabled
348
+ -- Perform sanity checks on the message to see whether the plugin is enabled
348
349
-- for this message in particular.
349
- -- If a plugin is not enabled, its handlers, commands, etc... will not be
350
+ -- If a plugin is not enabled, its handlers, commands, etc. will not be
350
351
-- run for the given message.
351
352
--
352
- -- Semantically, this method described whether a Plugin is enabled configuration wise
353
+ -- Semantically, this method describes whether a plugin is enabled configuration wise
353
354
-- and is allowed to respond to the message. This might depend on the URI that is
354
- -- associated to the Message Parameters, but doesn't have to . There are requests
355
- -- with no associated URI that, consequentially, can't inspect the URI.
355
+ -- associated to the Message Parameters. There are requests
356
+ -- with no associated URI that, consequentially, cannot inspect the URI.
356
357
--
357
- -- Common reason why a plugin might not be allowed to respond although it is enabled:
358
- -- * Plugin can not handle requests associated to the specific URI
358
+ -- A common reason why a plugin might not be allowed to respond although it is enabled:
359
+ -- * The plugin cannot handle requests associated with the specific URI
359
360
-- * Since the implementation of [cabal plugins](https://github.com/haskell/haskell-language-server/issues/2940)
360
- -- HLS knows plugins specific for Haskell and specific for [Cabal file descriptions](https://cabal.readthedocs.io/en/3.6/cabal-package.html)
361
+ -- HLS knows plugins specific to Haskell and specific to [Cabal file descriptions](https://cabal.readthedocs.io/en/3.6/cabal-package.html)
361
362
--
362
363
-- Strictly speaking, we are conflating two concepts here:
363
- -- * Dynamically enabled (e.g. enabled on a per-message basis)
364
+ -- * Dynamically enabled (e.g. on a per-message basis)
364
365
-- * Statically enabled (e.g. by configuration in the lsp-client)
365
366
-- * Strictly speaking, this might also change dynamically
366
367
--
367
- -- But there is no use to split it up currently into two different methods for now.
368
+ -- But there is no use to split it up into two different methods for now.
368
369
pluginEnabled
369
370
:: SMethod m
370
371
-- ^ Method type.
371
372
-> MessageParams m
372
373
-- ^ Whether a plugin is enabled might depend on the message parameters
373
- -- eg 'pluginFileType' specifies what file extension a plugin is allowed to handle
374
+ -- e.g. 'pluginFileType' specifies which file extensions a plugin is allowed to handle
374
375
-> PluginDescriptor c
375
- -- ^ Contains meta information such as PluginId and what file types this
376
+ -- ^ Contains meta information such as PluginId and which file types this
376
377
-- plugin is able to handle.
377
378
-> Config
378
- -- ^ Generic config description, expected to hold 'PluginConfig' configuration
379
+ -- ^ Generic config description, expected to contain 'PluginConfig' configuration
379
380
-- for this plugin
380
381
-> Bool
381
382
-- ^ Is this plugin enabled and allowed to respond to the given request
0 commit comments