More docs

This commit is contained in:
Max Brunsfeld 2024-01-09 10:53:57 -08:00
parent 7fbe0b8638
commit b02f37083b
7 changed files with 133 additions and 42 deletions

View file

@ -5,7 +5,7 @@ use gpui::{
MouseButton, MouseDownEvent, MouseMoveEvent, ParentElement, Pixels, Render, Styled,
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WindowContext,
};
use language::{Buffer, OwnedSyntaxLayerInfo};
use language::{Buffer, OwnedSyntaxLayer};
use settings::Settings;
use std::{mem, ops::Range};
use theme::{ActiveTheme, ThemeSettings};
@ -57,7 +57,7 @@ struct EditorState {
struct BufferState {
buffer: Model<Buffer>,
excerpt_id: ExcerptId,
active_layer: Option<OwnedSyntaxLayerInfo>,
active_layer: Option<OwnedSyntaxLayer>,
}
impl SyntaxTreeView {
@ -491,7 +491,7 @@ impl SyntaxTreeToolbarItemView {
})
}
fn render_header(active_layer: &OwnedSyntaxLayerInfo) -> ButtonLike {
fn render_header(active_layer: &OwnedSyntaxLayer) -> ButtonLike {
ButtonLike::new("syntax tree header")
.child(Label::new(active_layer.language.name()))
.child(Label::new(format_node_range(active_layer.node())))