QuarkdownLanguageServerLauncher

class QuarkdownLanguageServerLauncher(quarkdownDirectory: File?, input: InputStream = System.`in`, output: OutputStream = System.out, executor: ExecutorService = Executors.newCachedThreadPool(), onExit: () -> Unit = { exitProcess(0) })

Launcher for the Quarkdown Language Server.

Each launcher instance wraps a single client connection. Hosts that need to serve multiple clients in the same JVM (e.g. WebSockets) should construct one launcher per connection, passing the per-connection streams and a JVM-wide shared executor.

Parameters

quarkdownDirectory

the directory containing the Quarkdown distribution, if available

input

the input stream to read JSON-RPC messages from. Defaults to System.in.

output

the output stream to write JSON-RPC messages to. Defaults to System.out.

executor

the executor service to dispatch JSON-RPC requests and background work on. Defaults to a per-launcher cached thread pool. Pass a shared instance when hosting multiple servers in one JVM.

onExit

hook invoked when the client sends the LSP exit notification. Defaults to terminating the JVM, which is appropriate for stdio mode.

Constructors

Link copied to clipboard
constructor(quarkdownDirectory: File?, input: InputStream = System.`in`, output: OutputStream = System.out, executor: ExecutorService = Executors.newCachedThreadPool(), onExit: () -> Unit = { exitProcess(0) })

Functions

Link copied to clipboard

Connects the server to the client and starts listening for incoming JSON-RPC messages.