diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index a059fb7f2..f7e15225f 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -1345,6 +1345,13 @@ pub fn highlight_iter<'a>( result } + /// Gets the [LanguageConfiguration] for a given injection layer. + pub fn layer_config(&self, layer_id: LayerId) -> &Arc { + let language_id = self.layers[layer_id].config.language_id; + + &self.loader.language_configs[language_id] + } + // Commenting // comment_strings_for_pos // is_commented