@@ -1269,6 +1269,17 @@ mod cmd {
12691269 quit_all_impl(editor, args, event, true)
12701270 }
12711271
1272+ fn theme(editor: &mut Editor, args: &[&str], event: PromptEvent) {
1273+ let theme = if let Some(theme) = args.first() {
1274+ theme
1275+ } else {
1276+ editor.set_error("theme name not provided".into());
1277+ return;
1278+ };
1279+
1280+ editor.set_theme_from_name(theme);
1281+ }
1282+
12721283 pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
12731284 TypableCommand {
12741285 name: "quit",
@@ -1382,6 +1393,13 @@ mod cmd {
13821393 fun: force_quit_all,
13831394 completer: None,
13841395 },
1396+ TypableCommand {
1397+ name: "theme",
1398+ alias: None,
1399+ doc: "Change the theme of current view. Requires theme name as argument (:theme <name>)",
1400+ fun: theme,
1401+ completer: Some(completers::theme),
1402+ },
13851403
13861404 ];
13871405
@@ -2804,7 +2822,7 @@ fn hover(cx: &mut Context) {
28042822
28052823 // skip if contents empty
28062824
2807− let contents = ui::Markdown::new(contents);
2825+ let contents = ui::Markdown::new(contents, editor.syn_loader.clone());
28082826 let mut popup = Popup::new(contents);
28092827 compositor.push(Box::new(popup));
28102828 }