Fix minor issues pointed out in the review
This commit is contained in:
parent
3ad8d5363c
commit
ec327a30c3
17 changed files with 293 additions and 270 deletions
|
@ -324,7 +324,7 @@ mod tests {
|
|||
("number".into(), Color::yellow().into()),
|
||||
("property".into(), Color::white().into()),
|
||||
]);
|
||||
language.set_theme(theme.into());
|
||||
language.set_theme(&theme);
|
||||
|
||||
let grammar = language.grammar().unwrap();
|
||||
let highlight_function = grammar.highlight_id_for_name("function").unwrap();
|
||||
|
|
|
@ -315,7 +315,7 @@ mod tests {
|
|||
("property".into(), Color::white().into()),
|
||||
]);
|
||||
|
||||
language.set_theme(theme.into());
|
||||
language.set_theme(&theme);
|
||||
|
||||
let highlight_function = grammar.highlight_id_for_name("function").unwrap();
|
||||
let highlight_type = grammar.highlight_id_for_name("type").unwrap();
|
||||
|
@ -394,7 +394,7 @@ mod tests {
|
|||
("property".into(), Color::white().into()),
|
||||
]);
|
||||
|
||||
language.set_theme(theme.into());
|
||||
language.set_theme(&theme);
|
||||
|
||||
let highlight_function = grammar.highlight_id_for_name("function").unwrap();
|
||||
let highlight_type = grammar.highlight_id_for_name("type").unwrap();
|
||||
|
|
|
@ -217,7 +217,7 @@ fn main() {
|
|||
cx.observe_global::<Settings, _>({
|
||||
let languages = languages.clone();
|
||||
move |cx| {
|
||||
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone());
|
||||
languages.set_theme(cx.global::<Settings>().theme.clone());
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
@ -225,9 +225,7 @@ fn main() {
|
|||
cx.spawn({
|
||||
let languages = languages.clone();
|
||||
|cx| async move {
|
||||
cx.read(|cx| {
|
||||
languages.set_theme(cx.global::<Settings>().theme.editor.syntax.clone())
|
||||
});
|
||||
cx.read(|cx| languages.set_theme(cx.global::<Settings>().theme.clone()));
|
||||
init_languages.await;
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue