Store a reference to the LangageRegistry on the Worktree

This commit is contained in:
Nathan Sobo 2021-06-29 20:07:37 -06:00
parent 34963ac80d
commit bbf803d7dc
10 changed files with 84 additions and 106 deletions

View file

@ -142,10 +142,10 @@ fn write_tree(path: &Path, tree: serde_json::Value) {
pub fn build_app_state(cx: &AppContext) -> AppState {
let settings = settings::channel(&cx.font_cache()).unwrap().1;
let language_registry = Arc::new(LanguageRegistry::new());
let languages = Arc::new(LanguageRegistry::new());
AppState {
settings,
language_registry: language_registry.clone(),
rpc: rpc::Client::new(language_registry),
languages: languages.clone(),
rpc: rpc::Client::new(languages),
}
}