Add a function for getting language config by injection layer

get-lang-config-by-injection-layer
Michael Davis 11 months ago
parent 3014a2ae9b
commit 13b76ea797
No known key found for this signature in database

@ -1345,6 +1345,13 @@ impl Syntax {
result
}
/// Gets the [LanguageConfiguration] for a given injection layer.
pub fn layer_config(&self, layer_id: LayerId) -> &Arc<LanguageConfiguration> {
let language_id = self.layers[layer_id].config.language_id;
&self.loader.language_configs[language_id]
}
// Commenting
// comment_strings_for_pos
// is_commented

Loading…
Cancel
Save