Introduce StructureNodeKind

This commit is contained in:
ivan770
2021-03-14 17:16:29 +02:00
parent 8602f9573b
commit 7d48e04f31
7 changed files with 110 additions and 57 deletions

View File

@@ -11,7 +11,7 @@ use ide::{
AnnotationConfig, FileId, FilePosition, FileRange, HoverAction, HoverGotoTypeData, Query,
RangeInfo, Runnable, RunnableKind, SearchScope, SourceChange, TextEdit,
};
use ide_db::SymbolKind;
use ide_db::{StructureNodeKind, SymbolKind};
use itertools::Itertools;
use lsp_server::ErrorCode;
use lsp_types::{
@@ -289,7 +289,7 @@ pub(crate) fn handle_document_symbol(
let doc_symbol = lsp_types::DocumentSymbol {
name: symbol.label,
detail: symbol.detail,
kind: to_proto::symbol_kind(symbol.kind),
kind: to_proto::structure_node_kind(symbol.kind),
tags: Some(tags),
deprecated: Some(symbol.deprecated),
range: to_proto::range(&line_index, symbol.node_range),