use serde::{Deserialize, Serialize};
use crate::{
DynamicRegistrationClientCapabilities, PartialResultParams, Range, TextDocumentPositionParams,
WorkDoneProgressParams,
};
pub type DocumentHighlightClientCapabilities = DynamicRegistrationClientCapabilities;
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct DocumentHighlightParams {
#[serde(flatten)]
pub text_document_position_params: TextDocumentPositionParams,
#[serde(flatten)]
pub work_done_progress_params: WorkDoneProgressParams,
#[serde(flatten)]
pub partial_result_params: PartialResultParams,
}
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
pub struct DocumentHighlight {
pub range: Range,
#[serde(skip_serializing_if = "Option::is_none")]
pub kind: Option<DocumentHighlightKind>,
}
#[derive(Eq, PartialEq, Copy, Clone, Deserialize, Serialize)]
#[serde(transparent)]
pub struct DocumentHighlightKind(i32);
lsp_enum! {
impl DocumentHighlightKind {
pub const TEXT: DocumentHighlightKind = DocumentHighlightKind(1);
pub const READ: DocumentHighlightKind = DocumentHighlightKind(2);
pub const WRITE: DocumentHighlightKind = DocumentHighlightKind(3);
}
}