We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e477918 commit 908c626Copy full SHA for 908c626
helix-term/src/commands/typed.rs
@@ -1060,7 +1060,21 @@ fn tree_sitter_scopes(
1060
1061
let pos = doc.selection(view.id).primary().cursor(text);
1062
let scopes = indent::get_scopes(doc.syntax(), text, pos);
1063
- cx.editor.set_status(format!("scopes: {:?}", &scopes));
+
1064
+ let contents = format!("```json\n{:?}\n````", scopes);
1065
1066
+ let callback = async move {
1067
+ let call: job::Callback =
1068
+ Box::new(move |editor: &mut Editor, compositor: &mut Compositor| {
1069
+ let contents = ui::Markdown::new(contents, editor.syn_loader.clone());
1070
+ let popup = Popup::new("hover", contents).auto_close(true);
1071
+ compositor.replace_or_push("hover", popup);
1072
+ });
1073
+ Ok(call)
1074
+ };
1075
1076
+ cx.jobs.callback(callback);
1077
1078
Ok(())
1079
}
1080
0 commit comments