From 422efe59afe333a8371afe6f9fb45f159a6fb07f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 27 Aug 2018 22:52:43 +0300 Subject: you better run --- crates/server/src/main_loop/handlers.rs | 42 --------------------------------- crates/server/src/req.rs | 2 +- crates/tools/src/main.rs | 2 +- 3 files changed, 2 insertions(+), 44 deletions(-) (limited to 'crates') diff --git a/crates/server/src/main_loop/handlers.rs b/crates/server/src/main_loop/handlers.rs index 583af0900..ee4072084 100644 --- a/crates/server/src/main_loop/handlers.rs +++ b/crates/server/src/main_loop/handlers.rs @@ -135,48 +135,6 @@ pub fn handle_code_action( res.push(cmd); } } - for runnable in libeditor::runnables(&file) { - if !contains_offset_nonstrict(runnable.range, offset) { - continue; - } - - #[derive(Serialize)] - struct ProcessSpec { - bin: String, - args: Vec, - env: HashMap, - } - - let spec = ProcessSpec { - bin: "cargo".to_string(), - args: match runnable.kind { - libeditor::RunnableKind::Test { name } => { - vec![ - "test".to_string(), - "--".to_string(), - name, - "--nocapture".to_string(), - ] - } - libeditor::RunnableKind::Bin => vec!["run".to_string()] - }, - env: { - let mut m = HashMap::new(); - m.insert( - "RUST_BACKTRACE".to_string(), - "short".to_string(), - ); - m - } - }; - - let cmd = Command { - title: "Run ...".to_string(), - command: "libsyntax-rust.run".to_string(), - arguments: Some(vec![to_value(spec).unwrap()]), - }; - res.push(cmd); - } for (diag, quick_fix) in world.analysis().diagnostics(file_id)? { let quick_fix = match quick_fix { diff --git a/crates/server/src/req.rs b/crates/server/src/req.rs index e4138abba..269246dff 100644 --- a/crates/server/src/req.rs +++ b/crates/server/src/req.rs @@ -142,7 +142,7 @@ pub enum Runnables {} impl Request for Runnables { type Params = RunnablesParams; type Result = Vec; - const METHOD: &'static str = "m/joinLines"; + const METHOD: &'static str = "m/runnables"; } #[derive(Deserialize, Debug)] diff --git a/crates/tools/src/main.rs b/crates/tools/src/main.rs index 289ad6e3c..d7f34d757 100644 --- a/crates/tools/src/main.rs +++ b/crates/tools/src/main.rs @@ -204,7 +204,7 @@ cd code execute!( r" cd code -code --install-extension ./libsyntax-rust-0.0.1.vsix +code --install-extension ./rcf-lsp-0.0.1.vsix " )?; Ok(()) -- cgit v1.2.3