From 53e3bee0cfcd7541b5ee882ab4b47c9dde9780b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 25 Oct 2019 12:16:56 +0300 Subject: insert space after `->` --- crates/ra_lsp_server/src/caps.rs | 2 +- crates/ra_lsp_server/src/main_loop/handlers.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index 30bcbd7a8..eea0965ed 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -38,7 +38,7 @@ pub fn server_capabilities() -> ServerCapabilities { document_range_formatting_provider: None, document_on_type_formatting_provider: Some(DocumentOnTypeFormattingOptions { first_trigger_character: "=".to_string(), - more_trigger_character: Some(vec![".".to_string()]), + more_trigger_character: Some(vec![".".to_string(), ">".to_string()]), }), selection_range_provider: Some(GenericCapability::default()), folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 530c4d8b6..6f1e59b4b 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -132,6 +132,7 @@ pub fn handle_on_enter( } } +// Don't forget to add new trigger characters to `ServerCapabilities` in `caps.rs`. pub fn handle_on_type_formatting( world: WorldSnapshot, params: req::DocumentOnTypeFormattingParams, -- cgit v1.2.3