From e075e096cf4970014d2c0829476fd7a45a3f32b1 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 8 Jul 2019 14:09:38 +0300 Subject: don't send LocationLink unless the client opts-in closes #1474 --- crates/ra_lsp_server/tests/heavy_tests/support.rs | 24 ++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'crates/ra_lsp_server/tests/heavy_tests') diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs index a5e352da1..5dddbbe17 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/support.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs @@ -13,7 +13,8 @@ use lsp_types::{ notification::DidOpenTextDocument, notification::{Notification, ShowMessage}, request::{Request, Shutdown}, - DidOpenTextDocumentParams, TextDocumentIdentifier, TextDocumentItem, Url, + ClientCapabilities, DidOpenTextDocumentParams, GotoCapability, TextDocumentClientCapabilities, + TextDocumentIdentifier, TextDocumentItem, Url, }; use serde::Serialize; use serde_json::{to_string_pretty, Value}; @@ -92,8 +93,25 @@ impl Server { "test server", 128, move |msg_receiver, msg_sender| { - main_loop(roots, InitializationOptions::default(), &msg_receiver, &msg_sender) - .unwrap() + main_loop( + roots, + ClientCapabilities { + workspace: None, + text_document: Some(TextDocumentClientCapabilities { + definition: Some(GotoCapability { + dynamic_registration: None, + link_support: Some(true), + }), + ..Default::default() + }), + window: None, + experimental: None, + }, + InitializationOptions::default(), + &msg_receiver, + &msg_sender, + ) + .unwrap() }, ); let res = Server { req_id: Cell::new(1), dir, messages: Default::default(), worker }; -- cgit v1.2.3