File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ module Language.LSP.Server
26
26
27
27
, getClientCapabilities
28
28
, getConfig
29
+ , setConfig
29
30
, getRootPath
30
31
, getWorkspaceFolders
31
32
Original file line number Diff line number Diff line change @@ -441,12 +441,18 @@ freshLspId = do
441
441
-- ---------------------------------------------------------------------
442
442
443
443
-- | The current configuration from the client as set via the @initialize@ and
444
- -- @workspace/didChangeConfiguration@ requests.
444
+ -- @workspace/didChangeConfiguration@ requests, as well as by calls to
445
+ -- 'setConfig'.
445
446
getConfig :: MonadLsp config m => m config
446
447
getConfig = getsState resConfig
447
448
448
449
{-# INLINE getConfig #-}
449
450
451
+ setConfig :: MonadLsp config m => config -> m ()
452
+ setConfig config = stateState resConfig (const (() , config))
453
+
454
+ {-# INLINE setConfig #-}
455
+
450
456
getClientCapabilities :: MonadLsp config m => m J. ClientCapabilities
451
457
getClientCapabilities = resClientCapabilities <$> getLspEnv
452
458
You can’t perform that action at this time.
0 commit comments