aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2020-03-02 16:52:46 +0000
committerkjeremy <[email protected]>2020-03-02 16:52:46 +0000
commitc6f4e8de5eb194723612ca5db83321f35f8d281e (patch)
tree020411fd1fa0395963ca04c9a97bbaf91ae6245c /crates/rust-analyzer/src
parent96eca8a1abd79840b9040250db9d1e65ec663b0e (diff)
lsp-types 0.72
Diffstat (limited to 'crates/rust-analyzer/src')
-rw-r--r--crates/rust-analyzer/src/req.rs18
-rw-r--r--crates/rust-analyzer/src/semantic_tokens.rs3
2 files changed, 9 insertions, 12 deletions
diff --git a/crates/rust-analyzer/src/req.rs b/crates/rust-analyzer/src/req.rs
index fd6aef597..a3efe3b9f 100644
--- a/crates/rust-analyzer/src/req.rs
+++ b/crates/rust-analyzer/src/req.rs
@@ -42,14 +42,14 @@ impl Request for SyntaxTree {
42 const METHOD: &'static str = "rust-analyzer/syntaxTree"; 42 const METHOD: &'static str = "rust-analyzer/syntaxTree";
43} 43}
44 44
45#[derive(Deserialize, Debug)] 45#[derive(Deserialize, Serialize, Debug)]
46#[serde(rename_all = "camelCase")] 46#[serde(rename_all = "camelCase")]
47pub struct SyntaxTreeParams { 47pub struct SyntaxTreeParams {
48 pub text_document: TextDocumentIdentifier, 48 pub text_document: TextDocumentIdentifier,
49 pub range: Option<Range>, 49 pub range: Option<Range>,
50} 50}
51 51
52#[derive(Serialize, Debug)] 52#[derive(Deserialize, Serialize, Debug)]
53#[serde(rename_all = "camelCase")] 53#[serde(rename_all = "camelCase")]
54pub struct ExpandedMacro { 54pub struct ExpandedMacro {
55 pub name: String, 55 pub name: String,
@@ -64,7 +64,7 @@ impl Request for ExpandMacro {
64 const METHOD: &'static str = "rust-analyzer/expandMacro"; 64 const METHOD: &'static str = "rust-analyzer/expandMacro";
65} 65}
66 66
67#[derive(Deserialize, Debug)] 67#[derive(Deserialize, Serialize, Debug)]
68#[serde(rename_all = "camelCase")] 68#[serde(rename_all = "camelCase")]
69pub struct ExpandMacroParams { 69pub struct ExpandMacroParams {
70 pub text_document: TextDocumentIdentifier, 70 pub text_document: TextDocumentIdentifier,
@@ -79,7 +79,7 @@ impl Request for FindMatchingBrace {
79 const METHOD: &'static str = "rust-analyzer/findMatchingBrace"; 79 const METHOD: &'static str = "rust-analyzer/findMatchingBrace";
80} 80}
81 81
82#[derive(Deserialize, Debug)] 82#[derive(Deserialize, Serialize, Debug)]
83#[serde(rename_all = "camelCase")] 83#[serde(rename_all = "camelCase")]
84pub struct FindMatchingBraceParams { 84pub struct FindMatchingBraceParams {
85 pub text_document: TextDocumentIdentifier, 85 pub text_document: TextDocumentIdentifier,
@@ -101,14 +101,14 @@ impl Notification for PublishDecorations {
101 const METHOD: &'static str = "rust-analyzer/publishDecorations"; 101 const METHOD: &'static str = "rust-analyzer/publishDecorations";
102} 102}
103 103
104#[derive(Serialize, Debug)] 104#[derive(Deserialize, Serialize, Debug)]
105#[serde(rename_all = "camelCase")] 105#[serde(rename_all = "camelCase")]
106pub struct PublishDecorationsParams { 106pub struct PublishDecorationsParams {
107 pub uri: Url, 107 pub uri: Url,
108 pub decorations: Vec<Decoration>, 108 pub decorations: Vec<Decoration>,
109} 109}
110 110
111#[derive(Serialize, Debug)] 111#[derive(Deserialize, Serialize, Debug)]
112#[serde(rename_all = "camelCase")] 112#[serde(rename_all = "camelCase")]
113pub struct Decoration { 113pub struct Decoration {
114 pub range: Range, 114 pub range: Range,
@@ -132,7 +132,7 @@ impl Request for JoinLines {
132 const METHOD: &'static str = "rust-analyzer/joinLines"; 132 const METHOD: &'static str = "rust-analyzer/joinLines";
133} 133}
134 134
135#[derive(Deserialize, Debug)] 135#[derive(Deserialize, Serialize, Debug)]
136#[serde(rename_all = "camelCase")] 136#[serde(rename_all = "camelCase")]
137pub struct JoinLinesParams { 137pub struct JoinLinesParams {
138 pub text_document: TextDocumentIdentifier, 138 pub text_document: TextDocumentIdentifier,
@@ -162,7 +162,7 @@ pub struct RunnablesParams {
162 pub position: Option<Position>, 162 pub position: Option<Position>,
163} 163}
164 164
165#[derive(Serialize, Debug)] 165#[derive(Deserialize, Serialize, Debug)]
166#[serde(rename_all = "camelCase")] 166#[serde(rename_all = "camelCase")]
167pub struct Runnable { 167pub struct Runnable {
168 pub range: Range, 168 pub range: Range,
@@ -173,7 +173,7 @@ pub struct Runnable {
173 pub cwd: Option<String>, 173 pub cwd: Option<String>,
174} 174}
175 175
176#[derive(Serialize, Debug)] 176#[derive(Deserialize, Serialize, Debug)]
177#[serde(rename_all = "camelCase")] 177#[serde(rename_all = "camelCase")]
178pub struct SourceChange { 178pub struct SourceChange {
179 pub label: String, 179 pub label: String,
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs
index 1b146e4d8..d9ba77050 100644
--- a/crates/rust-analyzer/src/semantic_tokens.rs
+++ b/crates/rust-analyzer/src/semantic_tokens.rs
@@ -49,12 +49,9 @@ pub(crate) const SUPPORTED_MODIFIERS: &[SemanticTokenModifier] = &[
49 SemanticTokenModifier::DOCUMENTATION, 49 SemanticTokenModifier::DOCUMENTATION,
50 SemanticTokenModifier::DECLARATION, 50 SemanticTokenModifier::DECLARATION,
51 SemanticTokenModifier::DEFINITION, 51 SemanticTokenModifier::DEFINITION,
52 SemanticTokenModifier::REFERENCE,
53 SemanticTokenModifier::STATIC, 52 SemanticTokenModifier::STATIC,
54 SemanticTokenModifier::ABSTRACT, 53 SemanticTokenModifier::ABSTRACT,
55 SemanticTokenModifier::DEPRECATED, 54 SemanticTokenModifier::DEPRECATED,
56 SemanticTokenModifier::ASYNC,
57 SemanticTokenModifier::VOLATILE,
58 SemanticTokenModifier::READONLY, 55 SemanticTokenModifier::READONLY,
59 CONSTANT, 56 CONSTANT,
60 MUTABLE, 57 MUTABLE,