From fcccf8ec59420d20edc53f7d787f2412e297f5fe Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Wed, 11 Dec 2019 09:11:55 -0500 Subject: Support LSP 3.15 This merely upgrades our protocol support. It does not add any of the new features. --- crates/ra_lsp_server/src/caps.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index eea0965ed..4cb259360 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -5,7 +5,7 @@ use lsp_types::{ DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, - TextDocumentSyncOptions, TypeDefinitionProviderCapability, + TextDocumentSyncOptions, TypeDefinitionProviderCapability, WorkDoneProgressOptions, }; pub fn server_capabilities() -> ServerCapabilities { @@ -21,10 +21,14 @@ pub fn server_capabilities() -> ServerCapabilities { completion_provider: Some(CompletionOptions { resolve_provider: None, trigger_characters: Some(vec![":".to_string(), ".".to_string()]), + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), signature_help_provider: Some(SignatureHelpOptions { trigger_characters: Some(vec!["(".to_string(), ",".to_string(), ")".to_string()]), + retrigger_characters: None, + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), + declaration_provider: None, definition_provider: Some(true), type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), implementation_provider: Some(ImplementationProviderCapability::Simple(true)), @@ -44,6 +48,7 @@ pub fn server_capabilities() -> ServerCapabilities { folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), rename_provider: Some(RenameProviderCapability::Options(RenameOptions { prepare_provider: Some(true), + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, })), document_link_provider: None, color_provider: None, -- cgit v1.2.3 From 1e0bf205eff81f04c0e1e6c208c3489327520c3f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 11 Dec 2019 18:27:34 +0100 Subject: Revert "Support LSP 3.15" This reverts commit 712700d8e027b108f9c4f8fa9acc2f25e453b6d1. --- crates/ra_lsp_server/src/caps.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index 4cb259360..eea0965ed 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -5,7 +5,7 @@ use lsp_types::{ DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, - TextDocumentSyncOptions, TypeDefinitionProviderCapability, WorkDoneProgressOptions, + TextDocumentSyncOptions, TypeDefinitionProviderCapability, }; pub fn server_capabilities() -> ServerCapabilities { @@ -21,14 +21,10 @@ pub fn server_capabilities() -> ServerCapabilities { completion_provider: Some(CompletionOptions { resolve_provider: None, trigger_characters: Some(vec![":".to_string(), ".".to_string()]), - work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), signature_help_provider: Some(SignatureHelpOptions { trigger_characters: Some(vec!["(".to_string(), ",".to_string(), ")".to_string()]), - retrigger_characters: None, - work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), - declaration_provider: None, definition_provider: Some(true), type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), implementation_provider: Some(ImplementationProviderCapability::Simple(true)), @@ -48,7 +44,6 @@ pub fn server_capabilities() -> ServerCapabilities { folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), rename_provider: Some(RenameProviderCapability::Options(RenameOptions { prepare_provider: Some(true), - work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, })), document_link_provider: None, color_provider: None, -- cgit v1.2.3 From b0a4765059c38e7b614d98015f7544ce0abc1bdf Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 11 Dec 2019 18:34:01 +0100 Subject: Revert "Revert "Support LSP 3.15"" This reverts commit 1e0bf205eff81f04c0e1e6c208c3489327520c3f. --- crates/ra_lsp_server/src/caps.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index eea0965ed..4cb259360 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -5,7 +5,7 @@ use lsp_types::{ DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities, SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, - TextDocumentSyncOptions, TypeDefinitionProviderCapability, + TextDocumentSyncOptions, TypeDefinitionProviderCapability, WorkDoneProgressOptions, }; pub fn server_capabilities() -> ServerCapabilities { @@ -21,10 +21,14 @@ pub fn server_capabilities() -> ServerCapabilities { completion_provider: Some(CompletionOptions { resolve_provider: None, trigger_characters: Some(vec![":".to_string(), ".".to_string()]), + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), signature_help_provider: Some(SignatureHelpOptions { trigger_characters: Some(vec!["(".to_string(), ",".to_string(), ")".to_string()]), + retrigger_characters: None, + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), + declaration_provider: None, definition_provider: Some(true), type_definition_provider: Some(TypeDefinitionProviderCapability::Simple(true)), implementation_provider: Some(ImplementationProviderCapability::Simple(true)), @@ -44,6 +48,7 @@ pub fn server_capabilities() -> ServerCapabilities { folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), rename_provider: Some(RenameProviderCapability::Options(RenameOptions { prepare_provider: Some(true), + work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, })), document_link_provider: None, color_provider: None, -- cgit v1.2.3 From b4c8e5b9e95d28d3c18631e65caac4ff8c1f16d0 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 12 Dec 2019 07:55:05 -0500 Subject: Do not trigger signature help on close --- crates/ra_lsp_server/src/caps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index 4cb259360..e0bb75666 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -24,7 +24,7 @@ pub fn server_capabilities() -> ServerCapabilities { work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), signature_help_provider: Some(SignatureHelpOptions { - trigger_characters: Some(vec!["(".to_string(), ",".to_string(), ")".to_string()]), + trigger_characters: Some(vec!["(".to_string(), ",".to_string()]), retrigger_characters: None, work_done_progress_options: WorkDoneProgressOptions { work_done_progress: None }, }), -- cgit v1.2.3 From 429199d4815a001e1b60089b4f34c3ae6b7204f9 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Fri, 20 Dec 2019 18:57:31 -0500 Subject: Use SelectionRange from LSP 3.15 --- crates/ra_lsp_server/src/caps.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index e0bb75666..d812ff7ca 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -2,10 +2,11 @@ use lsp_types::{ CodeActionProviderCapability, CodeLensOptions, CompletionOptions, - DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, GenericCapability, - ImplementationProviderCapability, RenameOptions, RenameProviderCapability, ServerCapabilities, - SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind, - TextDocumentSyncOptions, TypeDefinitionProviderCapability, WorkDoneProgressOptions, + DocumentOnTypeFormattingOptions, FoldingRangeProviderCapability, + ImplementationProviderCapability, RenameOptions, RenameProviderCapability, + SelectionRangeProviderCapability, ServerCapabilities, SignatureHelpOptions, + TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions, + TypeDefinitionProviderCapability, WorkDoneProgressOptions, }; pub fn server_capabilities() -> ServerCapabilities { @@ -44,7 +45,7 @@ pub fn server_capabilities() -> ServerCapabilities { first_trigger_character: "=".to_string(), more_trigger_character: Some(vec![".".to_string(), ">".to_string()]), }), - selection_range_provider: Some(GenericCapability::default()), + selection_range_provider: Some(SelectionRangeProviderCapability::Simple(true)), folding_range_provider: Some(FoldingRangeProviderCapability::Simple(true)), rename_provider: Some(RenameProviderCapability::Options(RenameOptions { prepare_provider: Some(true), -- cgit v1.2.3 From 4ef5cd9a89fd5ee02ae655ba08486087af9ffcf4 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sat, 21 Dec 2019 15:27:38 -0500 Subject: Add some module docs --- crates/ra_lsp_server/src/caps.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_lsp_server/src/caps.rs') diff --git a/crates/ra_lsp_server/src/caps.rs b/crates/ra_lsp_server/src/caps.rs index d812ff7ca..eeca67ee1 100644 --- a/crates/ra_lsp_server/src/caps.rs +++ b/crates/ra_lsp_server/src/caps.rs @@ -1,4 +1,4 @@ -//! FIXME: write short doc here +//! Advertizes the capabilities of the LSP Server. use lsp_types::{ CodeActionProviderCapability, CodeLensOptions, CompletionOptions, -- cgit v1.2.3