Unnamed repository; edit this file 'description' to name the repository.
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.
Michael Davis 2025-02-26
parent 35575b0 · commit fcddd50
-rw-r--r--helix-term/src/application.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 2a4bea65..499732f0 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -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))]