We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9d7915 commit fe996b7Copy full SHA for fe996b7
kotlin-lsp/src/com/jetbrains/ls/kotlinLsp/KotlinLspServerRunConfig.kt
@@ -11,3 +11,13 @@ sealed interface KotlinLspServerMode {
11
12
data class Socket(val config: TcpConnectionConfig) : KotlinLspServerMode
13
}
14
+
15
16
+fun KotlinLspServerRunConfig.toArguments(): List<String> =
17
+ when (mode) {
18
+ is KotlinLspServerMode.Stdio -> listOf("--stdio")
19
+ is KotlinLspServerMode.Socket -> when (val tcpConfig = mode.config) {
20
+ is TcpConnectionConfig.Client -> listOf("--client", "--socket=${tcpConfig.port}")
21
+ is TcpConnectionConfig.Server -> listOf("--socket=${tcpConfig.port}")
22
+ }
23
0 commit comments