mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-02 02:17:44 +03:00
Add a function for getting language config by injection layer
This commit is contained in:
parent
3014a2ae9b
commit
13b76ea797
1 changed files with 7 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue