mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[dap] LSP-335: Provide lsp server coroutine scope to the command handler
GitOrigin-RevId: d6e066b306414b9c16b19a306e55f00cca969419
This commit is contained in:
committed by
intellij-monorepo-bot
parent
94ce469337
commit
f611a55f38
@@ -34,12 +34,14 @@ interface LspHandlersBuilder {
|
||||
|
||||
class LspHandlerContext(
|
||||
val lspClient: LspClient,
|
||||
val lspScope: CoroutineScope,
|
||||
)
|
||||
|
||||
context(context: LspHandlerContext)
|
||||
val lspClient: LspClient get() = context.lspClient
|
||||
|
||||
|
||||
context(context: LspHandlerContext)
|
||||
val lspScope: CoroutineScope get() = context.lspScope
|
||||
|
||||
class LspRequestHandler<Params, Result, Error>(
|
||||
val requestType: RequestType<Params, Result, Error>,
|
||||
|
||||
@@ -99,7 +99,7 @@ suspend fun withLsp(
|
||||
}
|
||||
}
|
||||
|
||||
val lspHandlerContext = LspHandlerContext(lspClient)
|
||||
val lspHandlerContext = LspHandlerContext(lspClient, this)
|
||||
|
||||
launch(CoroutineName("incoming requests accepter") + createCoroutineContext(lspClient)) {
|
||||
withSupervisor { supervisor ->
|
||||
|
||||
Reference in New Issue
Block a user