Show if tag is a def/ref in the cli

This commit is contained in:
Timothy Clem 2020-06-16 16:04:22 -07:00
parent 8d7459ed57
commit 9bf4939b9a

View file

@ -42,9 +42,10 @@ pub fn generate_tags(loader: &Loader, scope: Option<&str>, paths: &[String]) ->
let tag = tag?;
write!(
&mut stdout,
" {:<8} {:<40}\t{:>9}-{:<9}",
" {:<8} {:<40}\t [{}] {:>9}-{:<9}",
tag.kind,
str::from_utf8(&source[tag.name_range]).unwrap_or(""),
if tag.is_definition { "definition" } else { "reference" },
tag.span.start,
tag.span.end,
)?;