summaryrefslogtreecommitdiffstats
path: root/vendor/lsp-types/src/hover.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/lsp-types/src/hover.rs')
-rw-r--r--vendor/lsp-types/src/hover.rs172
1 files changed, 86 insertions, 86 deletions
diff --git a/vendor/lsp-types/src/hover.rs b/vendor/lsp-types/src/hover.rs
index 01bd2f8d1..4c94055e6 100644
--- a/vendor/lsp-types/src/hover.rs
+++ b/vendor/lsp-types/src/hover.rs
@@ -1,86 +1,86 @@
-use serde::{Deserialize, Serialize};
-
-use crate::{
- MarkedString, MarkupContent, MarkupKind, Range, TextDocumentPositionParams,
- TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams,
-};
-
-#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct HoverClientCapabilities {
- /// Whether completion supports dynamic registration.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub dynamic_registration: Option<bool>,
-
- /// Client supports the follow content formats for the content
- /// property. The order describes the preferred format of the client.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub content_format: Option<Vec<MarkupKind>>,
-}
-
-/// Hover options.
-#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct HoverOptions {
- #[serde(flatten)]
- pub work_done_progress_options: WorkDoneProgressOptions,
-}
-
-#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct HoverRegistrationOptions {
- #[serde(flatten)]
- pub text_document_registration_options: TextDocumentRegistrationOptions,
-
- #[serde(flatten)]
- pub hover_options: HoverOptions,
-}
-
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
-#[serde(untagged)]
-pub enum HoverProviderCapability {
- Simple(bool),
- Options(HoverOptions),
-}
-
-impl From<HoverOptions> for HoverProviderCapability {
- fn from(from: HoverOptions) -> Self {
- Self::Options(from)
- }
-}
-
-impl From<bool> for HoverProviderCapability {
- fn from(from: bool) -> Self {
- Self::Simple(from)
- }
-}
-
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct HoverParams {
- #[serde(flatten)]
- pub text_document_position_params: TextDocumentPositionParams,
-
- #[serde(flatten)]
- pub work_done_progress_params: WorkDoneProgressParams,
-}
-
-/// The result of a hover request.
-#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
-pub struct Hover {
- /// The hover's content
- pub contents: HoverContents,
- /// An optional range is a range inside a text document
- /// that is used to visualize a hover, e.g. by changing the background color.
- #[serde(skip_serializing_if = "Option::is_none")]
- pub range: Option<Range>,
-}
-
-/// Hover contents could be single entry or multiple entries.
-#[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize)]
-#[serde(untagged)]
-pub enum HoverContents {
- Scalar(MarkedString),
- Array(Vec<MarkedString>),
- Markup(MarkupContent),
-}
+use serde::{Deserialize, Serialize};
+
+use crate::{
+ MarkedString, MarkupContent, MarkupKind, Range, TextDocumentPositionParams,
+ TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams,
+};
+
+#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct HoverClientCapabilities {
+ /// Whether completion supports dynamic registration.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub dynamic_registration: Option<bool>,
+
+ /// Client supports the follow content formats for the content
+ /// property. The order describes the preferred format of the client.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub content_format: Option<Vec<MarkupKind>>,
+}
+
+/// Hover options.
+#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct HoverOptions {
+ #[serde(flatten)]
+ pub work_done_progress_options: WorkDoneProgressOptions,
+}
+
+#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct HoverRegistrationOptions {
+ #[serde(flatten)]
+ pub text_document_registration_options: TextDocumentRegistrationOptions,
+
+ #[serde(flatten)]
+ pub hover_options: HoverOptions,
+}
+
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(untagged)]
+pub enum HoverProviderCapability {
+ Simple(bool),
+ Options(HoverOptions),
+}
+
+impl From<HoverOptions> for HoverProviderCapability {
+ fn from(from: HoverOptions) -> Self {
+ Self::Options(from)
+ }
+}
+
+impl From<bool> for HoverProviderCapability {
+ fn from(from: bool) -> Self {
+ Self::Simple(from)
+ }
+}
+
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "camelCase")]
+pub struct HoverParams {
+ #[serde(flatten)]
+ pub text_document_position_params: TextDocumentPositionParams,
+
+ #[serde(flatten)]
+ pub work_done_progress_params: WorkDoneProgressParams,
+}
+
+/// The result of a hover request.
+#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
+pub struct Hover {
+ /// The hover's content
+ pub contents: HoverContents,
+ /// An optional range is a range inside a text document
+ /// that is used to visualize a hover, e.g. by changing the background color.
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub range: Option<Range>,
+}
+
+/// Hover contents could be single entry or multiple entries.
+#[derive(Debug, Eq, PartialEq, Clone, Serialize, Deserialize)]
+#[serde(untagged)]
+pub enum HoverContents {
+ Scalar(MarkedString),
+ Array(Vec<MarkedString>),
+ Markup(MarkupContent),
+}