Define language settings in the language crate

This commit is contained in:
Max Brunsfeld 2023-05-11 14:40:35 -07:00
parent 9ae10a5dd9
commit 39618ae32d
54 changed files with 1348 additions and 1161 deletions

View file

@ -369,8 +369,12 @@ pub struct AppState {
impl AppState {
#[cfg(any(test, feature = "test-support"))]
pub fn test(cx: &mut AppContext) -> Arc<Self> {
cx.set_global(settings::SettingsStore::test(cx));
cx.set_global(Settings::test(cx));
use settings::SettingsStore;
if !cx.has_global::<SettingsStore>() {
cx.set_global(SettingsStore::test(cx));
cx.set_global(Settings::test(cx));
}
let fs = fs::FakeFs::new(cx.background().clone());
let languages = Arc::new(LanguageRegistry::test());