@@ -74,10 +74,17 @@ fn main() {
7474 setup_logging(verbosity).expect("failed to initialize logging.");
7575
7676 // initialize language registry
77+ use helix_core::config_dir;
7778 use helix_core::syntax::{Loader, LOADER};
78− let toml = include_str!("../../languages.toml");
79+
80+ // load $HOME/.config/helix/languages.toml, fallback to default config
81+ let config = std::fs::read(config_dir().join("languages.toml"));
82+ let toml = config
83+ .as_deref()
84+ .unwrap_or(include_bytes!("../../languages.toml"));
85+
7986 LOADER.get_or_init(|| {
80− let config = toml::from_str(toml).expect("Could not parse languages.toml");
87+ let config = toml::from_slice(toml).expect("Could not parse languages.toml");
8188 Loader::new(config)
8289 });
8390