package com.jetbrains.lsp.protocol
import kotlinx.serialization.Serializable
import kotlinx.serialization.builtins.serializer
import kotlinx.serialization.json.JsonElement
/**
* @see executeCommandOptions (LSP spec)
*/
@Serializable
data class ExecuteCommandOptions(
val commands: List,
)
/**
* Represents parameters for executing a command.
* Extends WorkDoneProgressParams.
*
* @see executeCommandParams (LSP spec)
*/
@Serializable
data class ExecuteCommandParams(
/**
* The identifier of the actual command handler.
*/
val command: String,
/**
* Arguments that the command should be invoked with.
*/
val arguments: List? = null,
override val workDoneToken: ProgressToken? = null,
) : WorkDoneProgressParams
object Commands {
/**
* @see workspace/executeCommand (LSP spec)
*/
val ExecuteCommand: RequestType = RequestType(
method = "workspace/executeCommand",
paramsSerializer = ExecuteCommandParams.serializer(),
resultSerializer = JsonElement.serializer(),
errorSerializer = Unit.serializer(),
)
}