const METHOD: &'static str = "rust-analyzer/memoryUsage";
}
+pub enum ShuffleCrateGraph {}
+
+impl Request for ShuffleCrateGraph {
+ type Params = ();
+ type Result = ();
+ const METHOD: &'static str = "rust-analyzer/shuffleCrateGraph";
+}
+
pub enum ReloadWorkspace {}
impl Request for ReloadWorkspace {
pub enum HoverRequest {}
impl Request for HoverRequest {
- type Params = lsp_types::HoverParams;
+ type Params = HoverParams;
type Result = Option<Hover>;
const METHOD: &'static str = "textDocument/hover";
}
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct HoverParams {
+ pub text_document: TextDocumentIdentifier,
+ pub position: PositionOrRange,
+
+ #[serde(flatten)]
+ pub work_done_progress_params: WorkDoneProgressParams,
+}
+
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum PositionOrRange {
+ Position(lsp_types::Position),
+ Range(lsp_types::Range),
+}
+
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
pub struct Hover {
#[serde(flatten)]
}
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
pub struct WorkspaceSymbolParams {
#[serde(flatten)]
pub partial_result_params: PartialResultParams,
OnlyTypes,
AllSymbols,
}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CompletionResolveData {
+ pub position: lsp_types::TextDocumentPositionParams,
+ pub imports: Vec<CompletionImport>,
+}
+
+#[derive(Debug, Serialize, Deserialize)]
+pub struct CompletionImport {
+ pub full_import_path: String,
+ pub imported_name: String,
+}
+
+#[derive(Debug, Deserialize, Default)]
+pub struct ClientCommandOptions {
+ pub commands: Vec<String>,
+}