From b3183363a260a25e83001a20741a41ddbadbfd70 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Fri, 3 Jan 2025 04:10:59 -0500 Subject: [PATCH] feat(loader): add a way to get the cwd's language config Co-authored-by: Will Lillis --- cli/loader/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cli/loader/src/lib.rs b/cli/loader/src/lib.rs index cfdcd8d5..9b91be7e 100644 --- a/cli/loader/src/lib.rs +++ b/cli/loader/src/lib.rs @@ -1130,6 +1130,12 @@ impl Loader { } } + #[must_use] + pub fn get_language_configuration_in_current_path(&self) -> Option<&LanguageConfiguration> { + self.language_configuration_in_current_path + .map(|i| &self.language_configurations[i]) + } + pub fn find_language_configurations_at_path( &mut self, parser_path: &Path,