mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
Update languages' highlight mapppings when the theme changes
Co-authored-by: Keith Simmons <keith@zed.dev>
This commit is contained in:
parent
53bf7b61c0
commit
6658fa58c0
1 changed files with 10 additions and 2 deletions
|
@ -169,11 +169,19 @@ fn main() {
|
|||
.detach();
|
||||
|
||||
languages.set_language_server_download_dir(zed::ROOT_PATH.clone());
|
||||
let languages = Arc::new(languages);
|
||||
|
||||
cx.observe_global::<Settings, _>({
|
||||
let languages = languages.clone();
|
||||
move |settings, _| {
|
||||
languages.set_theme(&settings.theme.editor.syntax);
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
cx.set_global(settings);
|
||||
|
||||
let app_state = Arc::new(AppState {
|
||||
languages: Arc::new(languages),
|
||||
languages,
|
||||
themes,
|
||||
channel_list,
|
||||
client,
|
||||
|
|
Loading…
Reference in a new issue