aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/symbol_index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/symbol_index.rs')
-rw-r--r--crates/ra_ide_api/src/symbol_index.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs
index 94fe1d6d7..23c743bef 100644
--- a/crates/ra_ide_api/src/symbol_index.rs
+++ b/crates/ra_ide_api/src/symbol_index.rs
@@ -30,7 +30,7 @@ use std::{
30use fst::{self, Streamer}; 30use fst::{self, Streamer};
31use ra_syntax::{ 31use ra_syntax::{
32 SyntaxNode, SyntaxNodePtr, SourceFile, SmolStr, TreeArc, AstNode, 32 SyntaxNode, SyntaxNodePtr, SourceFile, SmolStr, TreeArc, AstNode,
33 algo::{visit::{visitor, Visitor}, find_covering_node}, 33 algo::{visit::{visitor, Visitor}},
34 SyntaxKind::{self, *}, 34 SyntaxKind::{self, *},
35 ast::{self, NameOwner}, 35 ast::{self, NameOwner},
36 WalkEvent, 36 WalkEvent,
@@ -66,14 +66,9 @@ fn file_symbols(db: &impl SymbolsDatabase, file_id: FileId) -> Arc<SymbolIndex>
66 db.check_canceled(); 66 db.check_canceled();
67 let source_file = db.parse(file_id); 67 let source_file = db.parse(file_id);
68 68
69 let mut symbols = source_file_to_file_symbols(&source_file, file_id); 69 let symbols = source_file_to_file_symbols(&source_file, file_id);
70 70
71 for (name, text_range) in hir::source_binder::macro_symbols(db, file_id) { 71 // TODO: add macros here
72 let node = find_covering_node(source_file.syntax(), text_range);
73 let ptr = SyntaxNodePtr::new(node);
74 // TODO: Should we get container name for macro symbols?
75 symbols.push(FileSymbol { file_id, name, ptr, name_range: None, container_name: None })
76 }
77 72
78 Arc::new(SymbolIndex::new(symbols)) 73 Arc::new(SymbolIndex::new(symbols))
79} 74}