Skip to content

Commit

Permalink
Cleanup file structure proto handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Veykril committed Oct 22, 2024
1 parent 3e02349 commit 5e3561e
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,12 @@ pub(crate) fn handle_document_symbol(
tags.push(SymbolTag::DEPRECATED)
};

#[allow(deprecated)]
let doc_symbol = lsp_types::DocumentSymbol {
name: symbol.label,
detail: symbol.detail,
kind: to_proto::structure_node_kind(symbol.kind),
tags: Some(tags),
#[allow(deprecated)]
deprecated: Some(symbol.deprecated),
range: to_proto::range(&line_index, symbol.node_range),
selection_range: to_proto::range(&line_index, symbol.navigation_range),
Expand Down Expand Up @@ -539,18 +539,11 @@ pub(crate) fn handle_document_symbol(
url: &Url,
res: &mut Vec<SymbolInformation>,
) {
let mut tags = Vec::new();

#[allow(deprecated)]
if let Some(true) = symbol.deprecated {
tags.push(SymbolTag::DEPRECATED)
}

#[allow(deprecated)]
res.push(SymbolInformation {
name: symbol.name.clone(),
kind: symbol.kind,
tags: Some(tags),
tags: symbol.tags.clone(),
#[allow(deprecated)]
deprecated: symbol.deprecated,
location: Location::new(url.clone(), symbol.range),
container_name,
Expand Down

0 comments on commit 5e3561e

Please sign in to comment.