diff options
Diffstat (limited to 'crates/server/src/req.rs')
-rw-r--r-- | crates/server/src/req.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/server/src/req.rs b/crates/server/src/req.rs index 645a17306..480fbabcd 100644 --- a/crates/server/src/req.rs +++ b/crates/server/src/req.rs | |||
@@ -1,5 +1,7 @@ | |||
1 | use serde::{ser::Serialize, de::DeserializeOwned}; | 1 | use serde::{ser::Serialize, de::DeserializeOwned}; |
2 | use url::Url; | ||
2 | use languageserver_types::{TextDocumentIdentifier, Range}; | 3 | use languageserver_types::{TextDocumentIdentifier, Range}; |
4 | use url_serde; | ||
3 | 5 | ||
4 | pub use languageserver_types::{ | 6 | pub use languageserver_types::{ |
5 | request::*, notification::*, | 7 | request::*, notification::*, |
@@ -58,3 +60,25 @@ pub struct ExtendSelectionParams { | |||
58 | pub struct ExtendSelectionResult { | 60 | pub struct ExtendSelectionResult { |
59 | pub selections: Vec<Range>, | 61 | pub selections: Vec<Range>, |
60 | } | 62 | } |
63 | |||
64 | pub enum PublishDecorations {} | ||
65 | |||
66 | impl Notification for PublishDecorations { | ||
67 | type Params = PublishDecorationsParams; | ||
68 | const METHOD: &'static str = "m/publishDecorations"; | ||
69 | } | ||
70 | |||
71 | #[derive(Serialize, Debug)] | ||
72 | #[serde(rename_all = "camelCase")] | ||
73 | pub struct PublishDecorationsParams { | ||
74 | #[serde(with = "url_serde")] | ||
75 | pub uri: Url, | ||
76 | pub decorations: Vec<Decoration>, | ||
77 | } | ||
78 | |||
79 | #[derive(Serialize, Debug)] | ||
80 | #[serde(rename_all = "camelCase")] | ||
81 | pub struct Decoration { | ||
82 | pub range: Range, | ||
83 | pub tag: &'static str | ||
84 | } | ||