From 99826dab153feffc8fe0d80600d9e812824d67b2 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 1 May 2020 14:12:31 -0400 Subject: [PATCH] Address comments --- crates/rust-analyzer/src/caps.rs | 3 ++- crates/rust-analyzer/src/main_loop/handlers.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/rust-analyzer/src/caps.rs b/crates/rust-analyzer/src/caps.rs index 38780726f7b..c0d3209262c 100644 --- a/crates/rust-analyzer/src/caps.rs +++ b/crates/rust-analyzer/src/caps.rs @@ -41,8 +41,9 @@ pub fn server_capabilities() -> ServerCapabilities { document_symbol_provider: Some(true), workspace_symbol_provider: Some(true), code_action_provider: Some(CodeActionProviderCapability::Options(CodeActionOptions { + // Advertise support for all built-in CodeActionKinds code_action_kinds: Some(vec![ - "".to_string(), + String::new(), lsp_types::code_action_kind::QUICKFIX.to_string(), lsp_types::code_action_kind::REFACTOR.to_string(), lsp_types::code_action_kind::REFACTOR_EXTRACT.to_string(), diff --git a/crates/rust-analyzer/src/main_loop/handlers.rs b/crates/rust-analyzer/src/main_loop/handlers.rs index 647bdc42627..0f623949ecb 100644 --- a/crates/rust-analyzer/src/main_loop/handlers.rs +++ b/crates/rust-analyzer/src/main_loop/handlers.rs @@ -703,7 +703,7 @@ fn create_single_code_action(assist: Assist, world: &WorldSnapshot) -> Result