Set theme before opening documents

This is not consequential now but when we switch to the new highlighter
we will want the theme to be set (and the loader's `scopes` to be set
based on the theme) before parsing a document. Previously `set_theme`
came after the loading of documents, so documents would be missing
locals highlights after being loaded and before the first edit.
This commit is contained in:
Michael Davis 2025-02-25 10:09:50 -05:00
parent 35575b0b0f
commit fcddd50325
No known key found for this signature in database

View file

@ -139,6 +139,7 @@ impl Application {
})),
handlers,
);
editor.set_theme(theme);
let keys = Box::new(Map::new(Arc::clone(&config), |config: &Config| {
&config.keys
@ -237,8 +238,6 @@ impl Application {
.unwrap_or_else(|_| editor.new_file(Action::VerticalSplit));
}
editor.set_theme(theme);
#[cfg(windows)]
let signals = futures_util::stream::empty();
#[cfg(not(windows))]