feat(loader): add language_for_configuration
(cherry picked from commit 0dc1044d0d)
This commit is contained in:
parent
5e93499f20
commit
61d67adbf7
1 changed files with 7 additions and 0 deletions
|
|
@ -600,6 +600,13 @@ impl Loader {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn language_for_configuration(
|
||||
&self,
|
||||
configuration: &LanguageConfiguration,
|
||||
) -> Result<Language> {
|
||||
self.language_for_id(configuration.language_id)
|
||||
}
|
||||
|
||||
fn language_for_id(&self, id: usize) -> Result<Language> {
|
||||
let (path, language, externals) = &self.languages_by_id[id];
|
||||
language
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue