diff options
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r-- | crates/ra_lsp_server/src/req.rs | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs index 747ab8a8c..b41e90328 100644 --- a/crates/ra_lsp_server/src/req.rs +++ b/crates/ra_lsp_server/src/req.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use serde::{Serialize, Deserialize}; | ||
2 | use languageserver_types::{Location, Position, Range, TextDocumentIdentifier, Url}; | 1 | use languageserver_types::{Location, Position, Range, TextDocumentIdentifier, Url}; |
3 | use rustc_hash::FxHashMap; | 2 | use rustc_hash::FxHashMap; |
3 | use serde::{Deserialize, Serialize}; | ||
4 | use url_serde; | 4 | use url_serde; |
5 | 5 | ||
6 | pub use languageserver_types::{ | 6 | pub use languageserver_types::{ |
@@ -8,7 +8,7 @@ pub use languageserver_types::{ | |||
8 | CompletionResponse, DocumentOnTypeFormattingParams, DocumentSymbolParams, | 8 | CompletionResponse, DocumentOnTypeFormattingParams, DocumentSymbolParams, |
9 | DocumentSymbolResponse, ExecuteCommandParams, Hover, InitializeResult, | 9 | DocumentSymbolResponse, ExecuteCommandParams, Hover, InitializeResult, |
10 | PublishDiagnosticsParams, ReferenceParams, SignatureHelp, TextDocumentEdit, | 10 | PublishDiagnosticsParams, ReferenceParams, SignatureHelp, TextDocumentEdit, |
11 | TextDocumentPositionParams, TextEdit, WorkspaceSymbolParams, | 11 | TextDocumentPositionParams, TextEdit, WorkspaceEdit, WorkspaceSymbolParams, |
12 | }; | 12 | }; |
13 | 13 | ||
14 | pub enum SyntaxTree {} | 14 | pub enum SyntaxTree {} |
@@ -151,26 +151,10 @@ pub struct Runnable { | |||
151 | #[serde(rename_all = "camelCase")] | 151 | #[serde(rename_all = "camelCase")] |
152 | pub struct SourceChange { | 152 | pub struct SourceChange { |
153 | pub label: String, | 153 | pub label: String, |
154 | pub source_file_edits: Vec<TextDocumentEdit>, | 154 | pub workspace_edit: WorkspaceEdit, |
155 | pub file_system_edits: Vec<FileSystemEdit>, | ||
156 | pub cursor_position: Option<TextDocumentPositionParams>, | 155 | pub cursor_position: Option<TextDocumentPositionParams>, |
157 | } | 156 | } |
158 | 157 | ||
159 | #[derive(Serialize, Debug)] | ||
160 | #[serde(tag = "type", rename_all = "camelCase")] | ||
161 | pub enum FileSystemEdit { | ||
162 | CreateFile { | ||
163 | #[serde(with = "url_serde")] | ||
164 | uri: Url, | ||
165 | }, | ||
166 | MoveFile { | ||
167 | #[serde(with = "url_serde")] | ||
168 | src: Url, | ||
169 | #[serde(with = "url_serde")] | ||
170 | dst: Url, | ||
171 | }, | ||
172 | } | ||
173 | |||
174 | pub enum InternalFeedback {} | 158 | pub enum InternalFeedback {} |
175 | 159 | ||
176 | impl Notification for InternalFeedback { | 160 | impl Notification for InternalFeedback { |