aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/conv.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/src/conv.rs')
-rw-r--r--crates/ra_lsp_server/src/conv.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs
index c260b51c4..562699b7c 100644
--- a/crates/ra_lsp_server/src/conv.rs
+++ b/crates/ra_lsp_server/src/conv.rs
@@ -9,7 +9,7 @@ use lsp_types::{
9use ra_ide::{ 9use ra_ide::{
10 translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition, 10 translate_offset_with_edit, CompletionItem, CompletionItemKind, FileId, FilePosition,
11 FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex, 11 FileRange, FileSystemEdit, Fold, FoldKind, InsertTextFormat, LineCol, LineIndex,
12 NavigationTarget, RangeInfo, Severity, SourceChange, SourceFileEdit, 12 NavigationTarget, RangeInfo, ReferenceAccess, Severity, SourceChange, SourceFileEdit,
13}; 13};
14use ra_syntax::{SyntaxKind, TextRange, TextUnit}; 14use ra_syntax::{SyntaxKind, TextRange, TextUnit};
15use ra_text_edit::{AtomTextEdit, TextEdit}; 15use ra_text_edit::{AtomTextEdit, TextEdit};
@@ -53,6 +53,18 @@ impl Conv for SyntaxKind {
53 } 53 }
54} 54}
55 55
56impl Conv for ReferenceAccess {
57 type Output = ::lsp_types::DocumentHighlightKind;
58
59 fn conv(self) -> Self::Output {
60 use lsp_types::DocumentHighlightKind;
61 match self {
62 ReferenceAccess::Read => DocumentHighlightKind::Read,
63 ReferenceAccess::Write => DocumentHighlightKind::Write,
64 }
65 }
66}
67
56impl Conv for CompletionItemKind { 68impl Conv for CompletionItemKind {
57 type Output = ::lsp_types::CompletionItemKind; 69 type Output = ::lsp_types::CompletionItemKind;
58 70