aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/req.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/req.rs')
-rw-r--r--crates/ra_lsp_server/src/req.rs22
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 @@
1use serde::{Serialize, Deserialize};
2use languageserver_types::{Location, Position, Range, TextDocumentIdentifier, Url}; 1use languageserver_types::{Location, Position, Range, TextDocumentIdentifier, Url};
3use rustc_hash::FxHashMap; 2use rustc_hash::FxHashMap;
3use serde::{Deserialize, Serialize};
4use url_serde; 4use url_serde;
5 5
6pub use languageserver_types::{ 6pub 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
14pub enum SyntaxTree {} 14pub enum SyntaxTree {}
@@ -151,26 +151,10 @@ pub struct Runnable {
151#[serde(rename_all = "camelCase")] 151#[serde(rename_all = "camelCase")]
152pub struct SourceChange { 152pub 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")]
161pub 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
174pub enum InternalFeedback {} 158pub enum InternalFeedback {}
175 159
176impl Notification for InternalFeedback { 160impl Notification for InternalFeedback {