@@ -310,8 +310,9 @@ impl Loader {
310310
311311 pub fn language_config_for_shebang(&self, source: &Rope) -> Option<Arc<LanguageConfiguration>> {
312312 let line = Cow::from(source.line(0));
313− static SHEBANG_REGEX: Lazy<Regex> =
314− Lazy::new(|| Regex::new(r"^#!\s*(?:\S*[/\\](?:env\s+)?)?([^\s\.\d]+)").unwrap());
313+ static SHEBANG_REGEX: Lazy<Regex> = Lazy::new(|| {
314+ Regex::new(r"^#!\s*(?:\S*[/\\](?:env\s+(?:\-\S+\s+)*)?)?([^\s\.\d]+)").unwrap()
315+ });
315316 let configuration_id = SHEBANG_REGEX
316317 .captures(&line)
317318 .and_then(|cap| self.language_config_ids_by_shebang.get(&cap[1]));