Add LSP request and VSCode command

This commit is contained in:
vsrs
2021-02-27 20:04:43 +03:00
parent 31f5f816e3
commit 669e117644
7 changed files with 96 additions and 9 deletions

View File

@@ -177,6 +177,26 @@ pub struct CargoRunnable {
pub expect_test: Option<bool>,
}
pub enum RelatedTests {}
impl Request for RelatedTests {
type Params = RelatedTestsParams;
type Result = Vec<TestInfo>;
const METHOD: &'static str = "rust-analyzer/relatedTests";
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct RelatedTestsParams {
#[serde(flatten)]
pub text_document_position: lsp_types::TextDocumentPositionParams,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct TestInfo {
pub runnable: Runnable,
}
pub enum InlayHints {}
impl Request for InlayHints {