Convert query capture indices to style ids
* Introduce a Theme struct as a new part of the app's settings * Store on each Language a ThemeMap, which converts the capture ids from that language's highlight query into StyleIds, which identify styles in the current Theme. * Update `highlighted_chunks` methods to provide StyleIds instead of capture ids.
This commit is contained in:
@@ -18,6 +18,7 @@ fn main() {
|
||||
|
||||
let (_, settings) = settings::channel(&app.font_cache()).unwrap();
|
||||
let language_registry = Arc::new(language::LanguageRegistry::new());
|
||||
language_registry.set_theme(&settings.borrow().theme);
|
||||
let app_state = AppState {
|
||||
language_registry,
|
||||
settings,
|
||||
|
||||
Reference in New Issue
Block a user