Move reference imports filtering into to_proto layer

This commit is contained in:
Lukas Wirth
2022-09-13 14:47:26 +02:00
parent f64c95600c
commit cadb01c315
7 changed files with 45 additions and 50 deletions

View File

@@ -83,10 +83,11 @@ pub(crate) fn structure_node_kind(kind: StructureNodeKind) -> lsp_types::SymbolK
pub(crate) fn document_highlight_kind(
category: ReferenceCategory,
) -> lsp_types::DocumentHighlightKind {
) -> Option<lsp_types::DocumentHighlightKind> {
match category {
ReferenceCategory::Read => lsp_types::DocumentHighlightKind::READ,
ReferenceCategory::Write => lsp_types::DocumentHighlightKind::WRITE,
ReferenceCategory::Read => Some(lsp_types::DocumentHighlightKind::READ),
ReferenceCategory::Write => Some(lsp_types::DocumentHighlightKind::WRITE),
ReferenceCategory::Import => None,
}
}