Skip to content

Commit 470cc0b

Browse files
VeryMilkyJoesmunix
authored andcommitted
Fix some grammar mistakes and typos (haskell#3614)
1 parent 61b9252 commit 470cc0b

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

Diff for: hls-plugin-api/src/Ide/Types.hs

+24-24
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ instance Show (IdeCommand st) where show _ = "<ide command>"
170170

171171
-- | We (initially anyway) mirror the hie configuration, so that existing
172172
-- 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.
174174
data Config =
175175
Config
176176
{ checkParents :: CheckParents
@@ -282,7 +282,7 @@ data PluginDescriptor (ideState :: *) =
282282
, pluginCli :: Maybe (ParserInfo (IdeCommand ideState))
283283
, pluginFileType :: [T.Text]
284284
-- ^ 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.
286286
-- When writing handlers, etc. for this plugin it can be assumed that all handled files are of this type.
287287
-- The file extension must have a leading '.'.
288288
}
@@ -301,8 +301,8 @@ pluginResponsible uri pluginDesc
301301
-- | An existential wrapper of 'Properties'
302302
data CustomConfig = forall r. CustomConfig (Properties r)
303303

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:
306306
--
307307
-- @
308308
-- {
@@ -317,7 +317,7 @@ data CustomConfig = forall r. CustomConfig (Properties r)
317317
-- }
318318
-- @
319319
--
320-
-- @globalOn@, @codeActionsOn@, and @codeLensOn@ etc. are called generic configs,
320+
-- @globalOn@, @codeActionsOn@, and @codeLensOn@ etc. are called generic configs
321321
-- which can be inferred from handlers registered by the plugin.
322322
-- @config@ is called custom config, which is defined using 'Properties'.
323323
data ConfigDescriptor = ConfigDescriptor {
@@ -344,38 +344,38 @@ defaultConfigDescriptor =
344344
class HasTracing (MessageParams m) => PluginMethod (k :: MethodType) (m :: Method FromClient k) where
345345

346346
-- | 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
348348
-- 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
350350
-- run for the given message.
351351
--
352-
-- Semantically, this method described whether a Plugin is enabled configuration wise
352+
-- Semantically, this method describes whether a plugin is enabled configuration wise
353353
-- 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.
356356
--
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
359359
-- * 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)
361361
--
362362
-- 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)
364364
-- * Statically enabled (e.g. by configuration in the lsp-client)
365365
-- * Strictly speaking, this might also change dynamically
366366
--
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.
368368
pluginEnabled
369369
:: SMethod m
370370
-- ^ Method type.
371371
-> MessageParams m
372372
-- ^ 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
374374
-> 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
376376
-- plugin is able to handle.
377377
-> Config
378-
-- ^ Generic config description, expected to hold 'PluginConfig' configuration
378+
-- ^ Generic config description, expected to contain 'PluginConfig' configuration
379379
-- for this plugin
380380
-> Bool
381381
-- ^ 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
395395
-- | How to combine responses from different plugins.
396396
--
397397
-- 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
400400
-- glorious hover box.
401401
--
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
404404
-- back one arbitrary result (arbitrary since it should only be one anyway).
405405
combineResponses
406406
:: SMethod m
@@ -779,7 +779,7 @@ defaultPluginPriority :: Natural
779779
defaultPluginPriority = 1000
780780

781781
-- | 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
783783
--
784784
-- * @.hs@
785785
-- * @.lhs@
@@ -802,7 +802,7 @@ defaultPluginDescriptor plId =
802802
[".hs", ".lhs", ".hs-boot"]
803803

804804
-- | 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,
806806
-- will only respond / run when @.cabal@ files are currently in scope.
807807
--
808808
-- Handles files with the following extensions:

0 commit comments

Comments
 (0)