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