| 1 |
use serde::{Deserialize, Serialize}; |
| 2 |
|
| 3 |
use crate::{ |
| 4 |
DynamicRegistrationClientCapabilities, Range, StaticRegistrationOptions, |
| 5 |
TextDocumentPositionParams, TextDocumentRegistrationOptions, WorkDoneProgressOptions, |
| 6 |
WorkDoneProgressParams, |
| 7 |
}; |
| 8 |
|
| 9 |
pub type LinkedEditingRangeClientCapabilities = DynamicRegistrationClientCapabilities; |
| 10 |
|
| 11 |
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)] |
| 12 |
#[serde(rename_all = "camelCase")] |
| 13 |
pub struct LinkedEditingRangeOptions { |
| 14 |
#[serde(flatten)] |
| 15 |
pub work_done_progress_options: WorkDoneProgressOptions, |
| 16 |
} |
| 17 |
|
| 18 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 19 |
#[serde(rename_all = "camelCase")] |
| 20 |
pub struct LinkedEditingRangeRegistrationOptions { |
| 21 |
#[serde(flatten)] |
| 22 |
pub text_document_registration_options: TextDocumentRegistrationOptions, |
| 23 |
|
| 24 |
#[serde(flatten)] |
| 25 |
pub linked_editing_range_options: LinkedEditingRangeOptions, |
| 26 |
|
| 27 |
#[serde(flatten)] |
| 28 |
pub static_registration_options: StaticRegistrationOptions, |
| 29 |
} |
| 30 |
|
| 31 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 32 |
#[serde(untagged)] |
| 33 |
pub enum LinkedEditingRangeServerCapabilities { |
| 34 |
Simple(bool), |
| 35 |
Options(LinkedEditingRangeOptions), |
| 36 |
RegistrationOptions(LinkedEditingRangeRegistrationOptions), |
| 37 |
} |
| 38 |
|
| 39 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 40 |
#[serde(rename_all = "camelCase")] |
| 41 |
pub struct LinkedEditingRangeParams { |
| 42 |
#[serde(flatten)] |
| 43 |
pub text_document_position_params: TextDocumentPositionParams, |
| 44 |
|
| 45 |
#[serde(flatten)] |
| 46 |
pub work_done_progress_params: WorkDoneProgressParams, |
| 47 |
} |
| 48 |
|
| 49 |
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)] |
| 50 |
#[serde(rename_all = "camelCase")] |
| 51 |
pub struct LinkedEditingRanges { |
| 52 |
|
| 53 |
|
| 54 |
pub ranges: Vec<Range>, |
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
#[serde(skip_serializing_if = "Option::is_none")] |
| 60 |
pub word_pattern: Option<String>, |
| 61 |
} |