File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1060,7 +1060,21 @@ fn tree_sitter_scopes(
1060
1060
1061
1061
let pos = doc. selection ( view. id ) . primary ( ) . cursor ( text) ;
1062
1062
let scopes = indent:: get_scopes ( doc. syntax ( ) , text, pos) ;
1063
- cx. editor . set_status ( format ! ( "scopes: {:?}" , & scopes) ) ;
1063
+
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
+
1064
1078
Ok ( ( ) )
1065
1079
}
1066
1080
You can’t perform that action at this time.
0 commit comments