aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-21 17:29:01 +0000
committerDmitry Sharshakov2021-08-21 17:29:01 +0000
commit462c8a6ec8799ad0dfc9b6643d78ae8372f04945 (patch)
treefda6d3c4263fe376904b010b5687237cef309632 /helix-term
parentafeaba1113cf6afcb8bea17b4a257079816100ec (diff)
Show debugger output in the statusline
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/application.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 2e7d16db..ec92a5d4 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -222,6 +222,17 @@ impl Application {
self.editor.set_status(status);
self.render();
}
+ "output" => {
+ let body: helix_dap::events::Output = from_value(ev.body.expect("`output` event must have a body")).unwrap();
+
+ let prefix = match body.category {
+ Some(category) => format!("Debug ({}):", category),
+ None => "Debug:".to_owned(),
+ };
+
+ self.editor.set_status(format!("{} {}", prefix, body.output));
+ self.render();
+ }
"initialized" => {
self.editor.set_status("Debugged application started".to_owned());
self.render();