mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
decorations
This commit is contained in:
parent
836e0c1863
commit
9863b9161d
6 changed files with 143 additions and 27 deletions
|
@ -1,5 +1,7 @@
|
|||
use serde::{ser::Serialize, de::DeserializeOwned};
|
||||
use url::Url;
|
||||
use languageserver_types::{TextDocumentIdentifier, Range};
|
||||
use url_serde;
|
||||
|
||||
pub use languageserver_types::{
|
||||
request::*, notification::*,
|
||||
|
@ -58,3 +60,25 @@ pub struct ExtendSelectionParams {
|
|||
pub struct ExtendSelectionResult {
|
||||
pub selections: Vec<Range>,
|
||||
}
|
||||
|
||||
pub enum PublishDecorations {}
|
||||
|
||||
impl Notification for PublishDecorations {
|
||||
type Params = PublishDecorationsParams;
|
||||
const METHOD: &'static str = "m/publishDecorations";
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PublishDecorationsParams {
|
||||
#[serde(with = "url_serde")]
|
||||
pub uri: Url,
|
||||
pub decorations: Vec<Decoration>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Decoration {
|
||||
pub range: Range,
|
||||
pub tag: &'static str
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue