helix-mods/helix-core/src/config.rs
Kirawi c2a40d9d52
Add support for local language configuration (#1249)
* add local configuration

* move config loading to Application::new

* simplify find_root_impl
2022-04-18 12:10:51 +09:00

10 lines
483 B
Rust

/// Syntax configuration loader based on built-in languages.toml.
pub fn default_syntax_loader() -> crate::syntax::Configuration {
helix_loader::config::default_lang_config()
.try_into()
.expect("Could not serialize built-in languages.toml")
}
/// Syntax configuration loader based on user configured languages.toml.
pub fn user_syntax_loader() -> Result<crate::syntax::Configuration, toml::de::Error> {
helix_loader::config::user_lang_config()?.try_into()
}