diff --git a/helix-core/src/comment.rs b/helix-core/src/comment.rs index a649ae207..d0771e05b 100644 --- a/helix-core/src/comment.rs +++ b/helix-core/src/comment.rs @@ -68,7 +68,7 @@ pub fn injection_for_range(syntax: &Syntax, from: usize, to: usize) -> Option= to; if is_encompassing { diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 321f3ab86..d59bb04a4 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -1097,7 +1097,7 @@ thread_local! { #[derive(Debug)] pub struct Syntax { - pub layers: HopSlotMap, + layers: HopSlotMap, root: LayerId, loader: Arc>, } @@ -1429,6 +1429,10 @@ impl Syntax { }) } + pub fn layers(&self) -> &HopSlotMap { + &self.layers + } + /// Get an injection layer's language configuration pub fn layer_config(&self, layer_id: LayerId) -> Arc { let loader = &self.loader.load();