aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 1bfc8153..13a0adcf 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1487,7 +1487,9 @@ fn tree_sitter_subtree(
.root_node()
.descendant_for_byte_range(from, to)
{
- let contents = format!("```tsq\n{}\n```", selected_node.to_sexp());
+ let mut contents = String::from("```tsq\n");
+ helix_core::syntax::pretty_print_tree(&mut contents, selected_node)?;
+ contents.push_str("\n```");
let callback = async move {
let call: job::Callback =