Start work on allowing variables in themes

This commit is contained in:
Max Brunsfeld 2021-07-30 17:22:59 -07:00
parent 5ac0a1985e
commit 92353b6967
9 changed files with 349 additions and 110 deletions

View file

@ -1,4 +1,11 @@
use crate::{fs::RealFs, language::LanguageRegistry, rpc, settings, time::ReplicaId, AppState};
use crate::{
fs::RealFs,
language::LanguageRegistry,
rpc,
settings::{self, ThemeRegistry},
time::ReplicaId,
AppState,
};
use gpui::{AppContext, Entity, ModelHandle};
use smol::channel;
use std::{
@ -149,8 +156,10 @@ fn write_tree(path: &Path, tree: serde_json::Value) {
pub fn build_app_state(cx: &AppContext) -> Arc<AppState> {
let settings = settings::channel(&cx.font_cache()).unwrap().1;
let languages = Arc::new(LanguageRegistry::new());
let themes = ThemeRegistry::new(());
Arc::new(AppState {
settings,
themes,
languages: languages.clone(),
rpc_router: Arc::new(ForegroundRouter::new()),
rpc: rpc::Client::new(languages),