internal: untangle usages of ReferenceCategory somewhat

Not everything that can be read or write is a reference, let's try to
use more precise types.
This commit is contained in:
Aleksey Kladov
2021-10-02 13:02:06 +03:00
parent 46eb03d99a
commit 12103b16de
3 changed files with 41 additions and 37 deletions

View File

@@ -1182,9 +1182,9 @@ pub(crate) fn handle_document_highlight(
};
let res = refs
.into_iter()
.map(|ide::HighlightedRange { range, access }| lsp_types::DocumentHighlight {
.map(|ide::HighlightedRange { range, category }| lsp_types::DocumentHighlight {
range: to_proto::range(&line_index, range),
kind: access.map(to_proto::document_highlight_kind),
kind: category.map(to_proto::document_highlight_kind),
})
.collect();
Ok(Some(res))