| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Development.IDE.LSP.LanguageServer
Synopsis
- runLanguageServer :: forall config a m. Show config => Recorder (WithPriority Log) -> Options -> Handle -> Handle -> config -> (config -> Value -> Either Text config) -> (config -> m ()) -> (MVar () -> IO (Setup config m a)) -> IO ()
- setupLSP :: Recorder (WithPriority Log) -> FilePath -> (FilePath -> IO FilePath) -> Handlers (ServerM config) -> (LanguageContextEnv config -> FilePath -> WithHieDb -> ThreadQueue -> IO IdeState) -> MVar () -> IO (Setup config (ServerM config) IdeState)
- data Log
- data ThreadQueue
- runWithWorkerThreads :: Recorder (WithPriority Log) -> FilePath -> (WithHieDb -> ThreadQueue -> IO ()) -> IO ()
- data Setup config (m :: Type -> Type) a = MkSetup {
- doInitialize :: LanguageContextEnv config -> TRequestMessage 'Method_Initialize -> IO (Either (TResponseError 'Method_Initialize) (LanguageContextEnv config, a))
- staticHandlers :: Handlers m
- interpretHandler :: (LanguageContextEnv config, a) -> m <~> IO
- onExit :: [IO ()]
Documentation
runLanguageServer :: forall config a m. Show config => Recorder (WithPriority Log) -> Options -> Handle -> Handle -> config -> (config -> Value -> Either Text config) -> (config -> m ()) -> (MVar () -> IO (Setup config m a)) -> IO () Source #
Arguments
| :: Recorder (WithPriority Log) | |
| -> FilePath | root directory, see Note [Root Directory] |
| -> (FilePath -> IO FilePath) | Map root paths to the location of the hiedb for the project |
| -> Handlers (ServerM config) | |
| -> (LanguageContextEnv config -> FilePath -> WithHieDb -> ThreadQueue -> IO IdeState) | |
| -> MVar () | |
| -> IO (Setup config (ServerM config) IdeState) |
data ThreadQueue Source #
runWithWorkerThreads :: Recorder (WithPriority Log) -> FilePath -> (WithHieDb -> ThreadQueue -> IO ()) -> IO () Source #
runWithWorkerThreads create several threads to run the session, db and session loader see Note [Serializing runs in separate thread]
data Setup config (m :: Type -> Type) a Source #
Constructors
| MkSetup | |
Fields
| |