mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-21 17:06:18 +04:00
Add a function for getting language config by injection layer
This commit is contained in:
parent
3014a2ae9b
commit
13b76ea797
@ -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<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…
Reference in New Issue
Block a user