Add Buffer::outline method
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
057dc62b90
commit
63a401ac5d
11 changed files with 224 additions and 4 deletions
12
crates/language/src/outline.rs
Normal file
12
crates/language/src/outline.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
use std::ops::Range;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Outline(pub Vec<OutlineItem>);
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct OutlineItem {
|
||||
pub id: usize,
|
||||
pub range: Range<usize>,
|
||||
pub text: String,
|
||||
pub name_range_in_text: Range<usize>,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue