@@ -170,7 +170,7 @@ instance Show (IdeCommand st) where show _ = "<ide command>"
170
170
171
171
-- | We (initially anyway) mirror the hie configuration, so that existing
172
172
-- clients can simply switch executable and not have any nasty surprises. There
173
- -- will be surprises relating to config options being ignored, initially though.
173
+ -- will initially be surprises relating to config options being ignored though.
174
174
data Config =
175
175
Config
176
176
{ checkParents :: CheckParents
@@ -282,7 +282,7 @@ data PluginDescriptor (ideState :: *) =
282
282
, pluginCli :: Maybe (ParserInfo (IdeCommand ideState ))
283
283
, pluginFileType :: [T. Text ]
284
284
-- ^ File extension of the files the plugin is responsible for.
285
- -- The plugin is only allowed to handle files with these extensions
285
+ -- The plugin is only allowed to handle files with these extensions.
286
286
-- When writing handlers, etc. for this plugin it can be assumed that all handled files are of this type.
287
287
-- The file extension must have a leading '.'.
288
288
}
@@ -301,8 +301,8 @@ pluginResponsible uri pluginDesc
301
301
-- | An existential wrapper of 'Properties'
302
302
data CustomConfig = forall r . CustomConfig (Properties r )
303
303
304
- -- | Describes the configuration a plugin.
305
- -- A plugin may be configurable in such form :
304
+ -- | Describes the configuration of a plugin.
305
+ -- A plugin may be configurable as can be seen below :
306
306
--
307
307
-- @
308
308
-- {
@@ -317,7 +317,7 @@ data CustomConfig = forall r. CustomConfig (Properties r)
317
317
-- }
318
318
-- @
319
319
--
320
- -- @globalOn@, @codeActionsOn@, and @codeLensOn@ etc. are called generic configs,
320
+ -- @globalOn@, @codeActionsOn@, and @codeLensOn@ etc. are called generic configs
321
321
-- which can be inferred from handlers registered by the plugin.
322
322
-- @config@ is called custom config, which is defined using 'Properties'.
323
323
data ConfigDescriptor = ConfigDescriptor {
@@ -344,38 +344,38 @@ defaultConfigDescriptor =
344
344
class HasTracing (MessageParams m ) => PluginMethod (k :: MethodType ) (m :: Method FromClient k ) where
345
345
346
346
-- | Parse the configuration to check if this plugin is enabled.
347
- -- Perform sanity checks on the message to see whether plugin is enabled
347
+ -- Perform sanity checks on the message to see whether the plugin is enabled
348
348
-- for this message in particular.
349
- -- If a plugin is not enabled, its handlers, commands, etc... will not be
349
+ -- If a plugin is not enabled, its handlers, commands, etc. will not be
350
350
-- run for the given message.
351
351
--
352
- -- Semantically, this method described whether a Plugin is enabled configuration wise
352
+ -- Semantically, this method describes whether a plugin is enabled configuration wise
353
353
-- 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.
354
+ -- associated to the Message Parameters. There are requests
355
+ -- with no associated URI that, consequentially, cannot inspect the URI.
356
356
--
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
357
+ -- A common reason why a plugin might not be allowed to respond although it is enabled:
358
+ -- * The plugin cannot handle requests associated with the specific URI
359
359
-- * 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)
360
+ -- HLS knows plugins specific to Haskell and specific to [Cabal file descriptions](https://cabal.readthedocs.io/en/3.6/cabal-package.html)
361
361
--
362
362
-- Strictly speaking, we are conflating two concepts here:
363
- -- * Dynamically enabled (e.g. enabled on a per-message basis)
363
+ -- * Dynamically enabled (e.g. on a per-message basis)
364
364
-- * Statically enabled (e.g. by configuration in the lsp-client)
365
365
-- * Strictly speaking, this might also change dynamically
366
366
--
367
- -- But there is no use to split it up currently into two different methods for now.
367
+ -- But there is no use to split it up into two different methods for now.
368
368
pluginEnabled
369
369
:: SMethod m
370
370
-- ^ Method type.
371
371
-> MessageParams m
372
372
-- ^ Whether a plugin is enabled might depend on the message parameters
373
- -- eg 'pluginFileType' specifies what file extension a plugin is allowed to handle
373
+ -- e.g. 'pluginFileType' specifies which file extensions a plugin is allowed to handle
374
374
-> PluginDescriptor c
375
- -- ^ Contains meta information such as PluginId and what file types this
375
+ -- ^ Contains meta information such as PluginId and which file types this
376
376
-- plugin is able to handle.
377
377
-> Config
378
- -- ^ Generic config description, expected to hold 'PluginConfig' configuration
378
+ -- ^ Generic config description, expected to contain 'PluginConfig' configuration
379
379
-- for this plugin
380
380
-> Bool
381
381
-- ^ Is this plugin enabled and allowed to respond to the given request
@@ -395,12 +395,12 @@ class PluginMethod Request m => PluginRequestMethod (m :: Method FromClient Requ
395
395
-- | How to combine responses from different plugins.
396
396
--
397
397
-- For example, for Hover requests, we might have multiple producers of
398
- -- Hover information, we do not want to decide which one to display to the user
399
- -- but allow here to define how to merge two hover request responses into one
398
+ -- Hover information. We do not want to decide which one to display to the user
399
+ -- but instead allow to define how to merge two hover request responses into one
400
400
-- glorious hover box.
401
401
--
402
- -- However, sometimes only one handler of a request can realistically exist,
403
- -- such as TextDocumentFormatting, it is safe to just unconditionally report
402
+ -- However, as sometimes only one handler of a request can realistically exist
403
+ -- ( such as TextDocumentFormatting) , it is safe to just unconditionally report
404
404
-- back one arbitrary result (arbitrary since it should only be one anyway).
405
405
combineResponses
406
406
:: SMethod m
@@ -779,7 +779,7 @@ defaultPluginPriority :: Natural
779
779
defaultPluginPriority = 1000
780
780
781
781
-- | Set up a plugin descriptor, initialized with default values.
782
- -- This is plugin descriptor is prepared for @haskell@ files, such as
782
+ -- This plugin descriptor is prepared for @haskell@ files, such as
783
783
--
784
784
-- * @.hs@
785
785
-- * @.lhs@
@@ -802,7 +802,7 @@ defaultPluginDescriptor plId =
802
802
[" .hs" , " .lhs" , " .hs-boot" ]
803
803
804
804
-- | Set up a plugin descriptor, initialized with default values.
805
- -- This is plugin descriptor is prepared for @.cabal@ files and as such,
805
+ -- This plugin descriptor is prepared for @.cabal@ files and as such,
806
806
-- will only respond / run when @.cabal@ files are currently in scope.
807
807
--
808
808
-- Handles files with the following extensions:
0 commit comments