@@ -1269,6 +1269,17 @@ mod cmd {
1269 quit_all_impl(editor, args, event, true)
1269 quit_all_impl(editor, args, event, true)
1272+ fn theme(editor: &mut Editor, args: &[&str], event: PromptEvent) {
1273+ let theme = if let Some(theme) = args.first() {
1276+ editor.set_error("theme name not provided".into());
1280+ editor.set_theme_from_name(theme);
1272 pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
1283 pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
1273 TypableCommand {
1284 TypableCommand {
1274 name: "quit",
1285 name: "quit",
@@ -1382,6 +1393,13 @@ mod cmd {
1382 fun: force_quit_all,
1393 fun: force_quit_all,
1383 completer: None,
1394 completer: None,
1399+ doc: "Change the theme of current view. Requires theme name as argument (:theme <name>)",
1401+ completer: Some(completers::theme),
@@ -2804,7 +2822,7 @@ fn hover(cx: &mut Context) {
2805 // skip if contents empty
2823 // skip if contents empty
2807− let contents = ui::Markdown::new(contents);
2825+ let contents = ui::Markdown::new(contents, editor.syn_loader.clone());
2808 let mut popup = Popup::new(contents);
2826 let mut popup = Popup::new(contents);
2809 compositor.push(Box::new(popup));
2827 compositor.push(Box::new(popup));