Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r--helix-core/src/syntax.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 93f618c0..ab6bcc1f 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -1025,9 +1025,10 @@ impl Loader {
match capture {
InjectionLanguageMarker::Name(string) => self.language_config_for_name(string),
InjectionLanguageMarker::Filename(file) => self.language_config_for_file_name(file),
- InjectionLanguageMarker::Shebang(shebang) => {
- self.language_config_for_language_id(shebang)
- }
+ InjectionLanguageMarker::Shebang(shebang) => self
+ .language_config_ids_by_shebang
+ .get(shebang)
+ .and_then(|&id| self.language_configs.get(id).cloned()),
}
}