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
2626
2727 , getClientCapabilities
2828 , getConfig
29+ , setConfig
2930 , getRootPath
3031 , getWorkspaceFolders
3132
Original file line number Diff line number Diff line change @@ -441,12 +441,18 @@ freshLspId = do
441441-- ---------------------------------------------------------------------
442442
443443-- | 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'.
445446getConfig :: MonadLsp config m => m config
446447getConfig = getsState resConfig
447448
448449{-# INLINE getConfig #-}
449450
451+ setConfig :: MonadLsp config m => config -> m ()
452+ setConfig config = stateState resConfig (const (() , config))
453+
454+ {-# INLINE setConfig #-}
455+
450456getClientCapabilities :: MonadLsp config m => m J. ClientCapabilities
451457getClientCapabilities = resClientCapabilities <$> getLspEnv
452458
You can’t perform that action at this time.
0 commit comments