2022-02-14 17:41:53 +01:00
|
|
|
/// Syntax configuration loader based on built-in languages.toml.
|
|
|
|
pub fn default_syntax_loader() -> crate::syntax::Configuration {
|
2022-04-18 05:10:51 +02:00
|
|
|
helix_loader::config::default_lang_config()
|
2022-02-14 17:41:53 +01:00
|
|
|
.try_into()
|
2022-02-15 00:23:35 +01:00
|
|
|
.expect("Could not serialize built-in languages.toml")
|
2022-02-14 17:41:53 +01:00
|
|
|
}
|
|
|
|
/// Syntax configuration loader based on user configured languages.toml.
|
|
|
|
pub fn user_syntax_loader() -> Result<crate::syntax::Configuration, toml::de::Error> {
|
2022-04-18 05:10:51 +02:00
|
|
|
helix_loader::config::user_lang_config()?.try_into()
|
2022-02-14 17:41:53 +01:00
|
|
|
}
|