summaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/syntax.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index e736b370..bb0073e1 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -504,6 +504,13 @@ impl Loader {
.cloned()
}
+ pub fn language_config_for_language_id(&self, id: &str) -> Option<Arc<LanguageConfiguration>> {
+ self.language_configs
+ .iter()
+ .find(|config| config.language_id == id)
+ .cloned()
+ }
+
pub fn language_configuration_for_injection_string(
&self,
string: &str,
@@ -529,6 +536,10 @@ impl Loader {
None
}
+ pub fn language_configs(&self) -> impl Iterator<Item = &Arc<LanguageConfiguration>> {
+ self.language_configs.iter()
+ }
+
pub fn set_scopes(&self, scopes: Vec<String>) {
self.scopes.store(Arc::new(scopes));