add open Cargo.toml action

This commit is contained in:
Anatol Liu
2020-11-12 17:48:07 -08:00
parent 111cc34c8f
commit b1b7727e04
15 changed files with 114 additions and 42 deletions

View File

@@ -354,3 +354,17 @@ impl Request for ExternalDocs {
type Result = Option<lsp_types::Url>;
const METHOD: &'static str = "experimental/externalDocs";
}
pub enum OpenCargoToml {}
impl Request for OpenCargoToml {
type Params = OpenCargoTomlParams;
type Result = Option<lsp_types::GotoDefinitionResponse>;
const METHOD: &'static str = "experimental/openCargoToml";
}
#[derive(Serialize, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct OpenCargoTomlParams {
pub text_document: TextDocumentIdentifier,
}