LanguageServerRouter

Utility to setup an RPC connection via stdin/stdout and route all requests to methods defined in the given extension module.

Members

Aliases

members
alias members = ExtensionModule.members
Undocumented in source.
shutdownRequested
alias shutdownRequested = ExtensionModule.shutdownRequested
Undocumented in source.

Functions

gotNotify
void delegate() gotNotify(RequestMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
gotRequest
void delegate() gotRequest(RequestMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
processNotify
void processNotify(RequestMessage msg)
Undocumented in source. Be warned that the author may not have intended to support it.
processRequest
ResponseMessage processRequest(RequestMessage msg)

Calls a method associated with the given request type in the

pushFiber
void pushFiber(T callback, int pages, string file, int line)
Undocumented in source. Be warned that the author may not have intended to support it.
run
bool run()

Runs the language server and returns true once it exited gracefully or false if it didn't exit gracefully.

Mixins

eventProcessor
mixin EventProcessor!(ExtensionModule, serverConfig.eventConfig) eventProcessor
Undocumented in source.

Static variables

fibers
FiberManager fibers;
Undocumented in source.
fibersMutex
Mutex fibersMutex;
Undocumented in source.
serverInitializeCalled
bool serverInitializeCalled;
Undocumented in source.

Variables

documents
TextDocumentManager documents;
Undocumented in source.
rpc
RPCProcessor rpc;
Undocumented in source.
shutdownRequested
bool shutdownRequested;
Undocumented in source.

Parameters

ExtensionModule

a module defining the following members: - members: a compile time list of all members in all modules that should be introspected to be called automatically on matching RPC commands. - InitializeResult initialize(InitializeParams): initialization method.

Optional: - bool shutdownRequested: a boolean that is set to true before the shutdown method handler or earlier which will terminate the RPC loop gracefully and wait for an exit notification to actually exit. - @protocolMethod("shutdown") JSONValue shutdown(): the method called when the client wants to shutdown the server. Can return anything, recommended return value is JSONValue(null). - parallelMain: an optional method which is run alongside everything else in parallel using fibers. Should yield as much as possible when there is nothing to do.

Meta