From 79941a9e701c6be849d40cb43744f1e2fee56354 Mon Sep 17 00:00:00 2001
From: DJMcNab <36049421+DJMcNab@users.noreply.github.com>
Date: Mon, 31 Dec 2018 11:08:44 +0000
Subject: Implement DocumentHighlight
---
crates/ra_lsp_server/src/main_loop/handlers.rs | 27 +++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
(limited to 'crates/ra_lsp_server/src/main_loop/handlers.rs')
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index a2c12a4c1..60441e8ea 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -6,9 +6,8 @@ use languageserver_types::{
DiagnosticSeverity, DocumentSymbol, Documentation, FoldingRange, FoldingRangeKind,
FoldingRangeParams, Location, MarkupContent, MarkupKind, MarkedString, Position,
PrepareRenameResponse, RenameParams, SymbolInformation, TextDocumentIdentifier, TextEdit,
- Range,
- WorkspaceEdit, ParameterInformation, ParameterLabel, SignatureInformation, Hover, HoverContents,
- DocumentFormattingParams,
+ Range, WorkspaceEdit, ParameterInformation, ParameterLabel, SignatureInformation, Hover,
+ HoverContents, DocumentFormattingParams, DocumentHighlight,
};
use ra_analysis::{FileId, FoldKind, Query, RunnableKind, FileRange, FilePosition, Severity};
use ra_syntax::{TextUnit, text_utils::intersect};
@@ -673,6 +672,28 @@ pub fn handle_code_action(
Ok(Some(CodeActionResponse::Commands(res)))
}
+pub fn handle_document_highlight(
+ world: ServerWorld,
+ params: req::TextDocumentPositionParams,
+) -> Result