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