From bb22a4e386c13a17b518a3822d343f6dd3dc4398 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sun, 22 Mar 2020 15:00:44 +0800 Subject: Add support for macro in symbo_index --- crates/ra_ide_db/src/symbol_index.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/ra_ide_db/src') diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 884359ee3..0f46f93c1 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -362,6 +362,13 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { ast::TypeAliasDef(it) => { decl(it) }, ast::ConstDef(it) => { decl(it) }, ast::StaticDef(it) => { decl(it) }, + ast::MacroCall(it) => { + if it.is_macro_rules().is_some() { + decl(it) + } else { + None + } + }, _ => None, } } -- cgit v1.2.3