| 1 |
use crate::{ |
| 2 |
PartialResultParams, Range, TextDocumentIdentifier, Url, WorkDoneProgressOptions, |
| 3 |
WorkDoneProgressParams, |
| 4 |
}; |
| 5 |
use serde::{Deserialize, Serialize}; |
| 6 |
use serde_json::Value; |
| 7 |
|
| 8 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 9 |
#[serde(rename_all = "camelCase")] |
| 10 |
pub struct DocumentLinkClientCapabilities { |
| 11 |
|
| 12 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 13 |
pub dynamic_registration: Option<bool>, |
| 14 |
|
| 15 |
|
| 16 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 17 |
pub tooltip_support: Option<bool>, |
| 18 |
} |
| 19 |
|
| 20 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 21 |
#[serde(rename_all = "camelCase")] |
| 22 |
pub struct DocumentLinkOptions { |
| 23 |
|
| 24 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 25 |
pub resolve_provider: Option<bool>, |
| 26 |
|
| 27 |
#[serde(flatten)] |
| 28 |
pub work_done_progress_options: WorkDoneProgressOptions, |
| 29 |
} |
| 30 |
|
| 31 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 32 |
#[serde(rename_all = "camelCase")] |
| 33 |
pub struct DocumentLinkParams { |
| 34 |
|
| 35 |
pub text_document: TextDocumentIdentifier, |
| 36 |
|
| 37 |
#[serde(flatten)] |
| 38 |
pub work_done_progress_params: WorkDoneProgressParams, |
| 39 |
|
| 40 |
#[serde(flatten)] |
| 41 |
pub partial_result_params: PartialResultParams, |
| 42 |
} |
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 47 |
pub struct DocumentLink { |
| 48 |
|
| 49 |
pub range: Range, |
| 50 |
|
| 51 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 52 |
pub target: Option<Url>, |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 60 |
pub tooltip: Option<String>, |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 65 |
pub data: Option<Value>, |
| 66 |
} |