match type definition parity with vscode
This commit is contained in:
parent
3edf8097b3
commit
be10c078c7
2 changed files with 72 additions and 0 deletions
|
|
@ -592,6 +592,14 @@ class IntelliJIDE(
|
|||
throw NotImplementedError("gotoDefinition not implemented yet")
|
||||
}
|
||||
|
||||
override suspend fun gotoTypeDefinition(location: Location): List<RangeInFile> {
|
||||
throw NotImplementedError("gotoTypeDefinition not implemented yet")
|
||||
}
|
||||
|
||||
override suspend fun getSignatureHelp(location: Location): SignatureHelp? {
|
||||
throw NotImplementedError("getSignatureHelp not implemented yet")
|
||||
}
|
||||
|
||||
override fun onDidChangeActiveTextEditor(callback: (filepath: String) -> Unit) {
|
||||
throw NotImplementedError("onDidChangeActiveTextEditor not implemented yet")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,68 @@ data class RangeInFileWithContents(
|
|||
val contents: String
|
||||
)
|
||||
|
||||
/**
|
||||
* Signature help represents the signature of something
|
||||
* callable. There can be multiple signatures but only one
|
||||
* active and only one active parameter.
|
||||
*/
|
||||
data class SignatureHelp(
|
||||
/**
|
||||
* One or more signatures.
|
||||
*/
|
||||
val signatures: List<SignatureInformation>,
|
||||
|
||||
/**
|
||||
* The active signature.
|
||||
*/
|
||||
val activeSignature: Int,
|
||||
|
||||
/**
|
||||
* The active parameter of the active signature.
|
||||
*/
|
||||
val activeParameter: Int
|
||||
)
|
||||
|
||||
/**
|
||||
* Represents the signature of something callable. A signature
|
||||
* can have a label, like a function-name, a doc-comment, and
|
||||
* a set of parameters.
|
||||
*/
|
||||
data class SignatureInformation(
|
||||
/**
|
||||
* The label of this signature. Will be shown in
|
||||
* the UI.
|
||||
*/
|
||||
val label: String,
|
||||
|
||||
/**
|
||||
* The parameters of this signature.
|
||||
*/
|
||||
val parameters: List<ParameterInformation>,
|
||||
|
||||
/**
|
||||
* The index of the active parameter.
|
||||
*
|
||||
* If provided, this is used in place of [SignatureHelp.activeParameter].
|
||||
*/
|
||||
val activeParameter: Int? = null
|
||||
)
|
||||
|
||||
/**
|
||||
* Represents a parameter of a callable-signature. A parameter can
|
||||
* have a label and a doc-comment.
|
||||
*/
|
||||
data class ParameterInformation(
|
||||
/**
|
||||
* The label of this signature.
|
||||
*
|
||||
* Either a string or inclusive start and exclusive end offsets within its containing
|
||||
* [SignatureInformation.label] signature label. *Note*: A label of type string must be
|
||||
* a substring of its containing signature information's [SignatureInformation.label] label.
|
||||
*/
|
||||
val label: String // Note: Kotlin doesn't have union types, so this represents the string case
|
||||
)
|
||||
|
||||
data class ControlPlaneSessionInfo(
|
||||
val accessToken: String,
|
||||
val account: Account
|
||||
|
|
@ -191,6 +253,8 @@ interface IDE {
|
|||
|
||||
// LSP
|
||||
suspend fun gotoDefinition(location: Location): List<RangeInFile>
|
||||
suspend fun gotoTypeDefinition(location: Location): List<RangeInFile>
|
||||
suspend fun getSignatureHelp(location: Location): SignatureHelp?
|
||||
|
||||
// Callbacks
|
||||
fun onDidChangeActiveTextEditor(callback: (filepath: String) -> Unit)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue