on master help sign in
Show debugger output in the statusline
462c8a6Dmitry Sharshakov
helix-term/src/application.rs+11
@@ -222,6 +222,17 @@ impl Application {
222 self.editor.set_status(status);
222 self.editor.set_status(status);
223 self.render();
223 self.render();
224 }
224 }
225+ "output" => {
226+ let body: helix_dap::events::Output = from_value(ev.body.expect("`output` event must have a body")).unwrap();
227+
228+ let prefix = match body.category {
229+ Some(category) => format!("Debug ({}):", category),
230+ None => "Debug:".to_owned(),
231+ };
232+
233+ self.editor.set_status(format!("{} {}", prefix, body.output));
234+ self.render();
235+ }
225 "initialized" => {
236 "initialized" => {
226 self.editor.set_status("Debugged application started".to_owned());
237 self.editor.set_status("Debugged application started".to_owned());
227 self.render();
238 self.render();