When sending ClientCapabilities client can add experimental section that is custom for different client/server settings.
Metals supports parameter quickPickProvider that is boolean and can be set to true/false.
If this setting is set to true metals will assume this request can be handled by client:
/**
* Opens an menu to ask the user to pick one of the suggested options.
*
* @return the user provided pick.
*/
@JsonRequest("metals/quickPick")
def metalsQuickPick(
params: MetalsQuickPickParams
): MetalsQuickPickResult
Method parameter(serialized to json):
case class MetalsQuickPickParams(
items: java.util.List[MetalsQuickPickItem],
@Nullable placeHolder: String = null
)
case class MetalsQuickPickItem(
id: String,
// A human readable string which is rendered prominent.
label: String
)
And expected response:
case class MetalsQuickPickResult(
// value=null when cancelled=true
@Nullable itemId: String = null,
@Nullable cancelled: java.lang.Boolean = null
)
I will try to add later a link to scala repository with description how it could be checked it works.
Specs for LSP for initialization message: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#initialize
When sending ClientCapabilities client can add experimental section that is custom for different client/server settings.
Metals supports parameter
quickPickProvider
that is boolean and can be set to true/false.If this setting is set to true metals will assume this request can be handled by client:
Method parameter(serialized to json):
And expected response:
I will try to add later a link to scala repository with description how it could be checked it works.