Improve the look of the syntax tree view UI
This commit is contained in:
parent
e969e3b028
commit
56b749788f
8 changed files with 382 additions and 67 deletions
|
@ -2117,6 +2117,10 @@ impl BufferSnapshot {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn syntax_layers(&self) -> impl Iterator<Item = SyntaxLayerInfo> + '_ {
|
||||
self.syntax.layers_for_range(0..self.len(), &self.text)
|
||||
}
|
||||
|
||||
pub fn syntax_layer_at<D: ToOffset>(&self, position: D) -> Option<SyntaxLayerInfo> {
|
||||
let offset = position.to_offset(self);
|
||||
self.syntax
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue