2 PartialResultParams
, Range
, TextDocumentIdentifier
, WorkDoneProgressOptions
,
3 WorkDoneProgressParams
,
5 use serde
::{Deserialize, Serialize}
;
9 #[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
10 #[serde(rename_all = "camelCase")]
11 pub struct DocumentLinkClientCapabilities
{
12 /// Whether document link supports dynamic registration.
13 #[serde(skip_serializing_if = "Option::is_none")]
14 pub dynamic_registration
: Option
<bool
>,
16 /// Whether the client support the `tooltip` property on `DocumentLink`.
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub tooltip_support
: Option
<bool
>,
21 #[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
22 #[serde(rename_all = "camelCase")]
23 pub struct DocumentLinkOptions
{
24 /// Document links have a resolve provider as well.
25 #[serde(skip_serializing_if = "Option::is_none")]
26 pub resolve_provider
: Option
<bool
>,
29 pub work_done_progress_options
: WorkDoneProgressOptions
,
32 #[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
33 #[serde(rename_all = "camelCase")]
34 pub struct DocumentLinkParams
{
35 /// The document to provide document links for.
36 pub text_document
: TextDocumentIdentifier
,
39 pub work_done_progress_params
: WorkDoneProgressParams
,
42 pub partial_result_params
: PartialResultParams
,
45 /// A document link is a range in a text document that links to an internal or external resource, like another
46 /// text document or a web site.
47 #[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
48 pub struct DocumentLink
{
49 /// The range this link applies to.
51 /// The uri this link points to.
52 #[serde(skip_serializing_if = "Option::is_none")]
53 pub target
: Option
<Url
>,
55 /// The tooltip text when you hover over this link.
57 /// If a tooltip is provided, is will be displayed in a string that includes instructions on how to
58 /// trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
59 /// user settings, and localization.
60 #[serde(skip_serializing_if = "Option::is_none")]
61 pub tooltip
: Option
<String
>,
63 /// A data entry field that is preserved on a document link between a DocumentLinkRequest
64 /// and a DocumentLinkResolveRequest.
65 #[serde(skip_serializing_if = "Option::is_none")]
66 pub data
: Option
<Value
>,