| 1 |
use crate::{ |
| 2 |
DynamicRegistrationClientCapabilities, LSPAny, PartialResultParams, Range, |
| 3 |
StaticRegistrationOptions, SymbolKind, SymbolTag, TextDocumentPositionParams, |
| 4 |
TextDocumentRegistrationOptions, Url, WorkDoneProgressOptions, WorkDoneProgressParams, |
| 5 |
}; |
| 6 |
|
| 7 |
use serde::{Deserialize, Serialize}; |
| 8 |
|
| 9 |
pub type TypeHierarchyClientCapabilities = DynamicRegistrationClientCapabilities; |
| 10 |
|
| 11 |
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)] |
| 12 |
pub struct TypeHierarchyOptions { |
| 13 |
#[serde(flatten)] |
| 14 |
pub work_done_progress_options: WorkDoneProgressOptions, |
| 15 |
} |
| 16 |
|
| 17 |
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)] |
| 18 |
pub struct TypeHierarchyRegistrationOptions { |
| 19 |
#[serde(flatten)] |
| 20 |
pub text_document_registration_options: TextDocumentRegistrationOptions, |
| 21 |
#[serde(flatten)] |
| 22 |
pub type_hierarchy_options: TypeHierarchyOptions, |
| 23 |
#[serde(flatten)] |
| 24 |
pub static_registration_options: StaticRegistrationOptions, |
| 25 |
} |
| 26 |
|
| 27 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 28 |
pub struct TypeHierarchyPrepareParams { |
| 29 |
#[serde(flatten)] |
| 30 |
pub text_document_position_params: TextDocumentPositionParams, |
| 31 |
#[serde(flatten)] |
| 32 |
pub work_done_progress_params: WorkDoneProgressParams, |
| 33 |
} |
| 34 |
|
| 35 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 36 |
pub struct TypeHierarchySupertypesParams { |
| 37 |
pub item: TypeHierarchyItem, |
| 38 |
|
| 39 |
#[serde(flatten)] |
| 40 |
pub work_done_progress_params: WorkDoneProgressParams, |
| 41 |
#[serde(flatten)] |
| 42 |
pub partial_result_params: PartialResultParams, |
| 43 |
} |
| 44 |
|
| 45 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 46 |
pub struct TypeHierarchySubtypesParams { |
| 47 |
pub item: TypeHierarchyItem, |
| 48 |
|
| 49 |
#[serde(flatten)] |
| 50 |
pub work_done_progress_params: WorkDoneProgressParams, |
| 51 |
#[serde(flatten)] |
| 52 |
pub partial_result_params: PartialResultParams, |
| 53 |
} |
| 54 |
|
| 55 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 56 |
#[serde(rename_all = "camelCase")] |
| 57 |
pub struct TypeHierarchyItem { |
| 58 |
|
| 59 |
pub name: String, |
| 60 |
|
| 61 |
|
| 62 |
pub kind: SymbolKind, |
| 63 |
|
| 64 |
|
| 65 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 66 |
pub tags: Option<SymbolTag>, |
| 67 |
|
| 68 |
|
| 69 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 70 |
pub detail: Option<String>, |
| 71 |
|
| 72 |
|
| 73 |
pub uri: Url, |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
pub range: Range, |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
pub selection_range: Range, |
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 89 |
pub data: Option<LSPAny>, |
| 90 |
} |