aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-09-06 10:49:31 +0000
committerDmitry Sharshakov2021-09-06 10:49:31 +0000
commit413e477dc2d4792596f99979140d2879ec3d4f4f (patch)
tree08635bffdf5ef85ab2f9cae177216a96ae9543bf
parent507a1f8dd6a7f88b979a09532a14a10eda72867b (diff)
lldb: use stdio transport by default
-rw-r--r--helix-core/src/syntax.rs1
-rw-r--r--helix-dap/src/client.rs8
-rw-r--r--languages.toml12
3 files changed, 10 insertions, 11 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index cabfe083..bbee921b 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -98,6 +98,7 @@ pub struct DebugAdapterConfig {
pub name: String,
pub transport: String,
pub command: String,
+ #[serde(default)]
pub args: Vec<String>,
pub port_arg: Option<String>,
pub templates: Vec<DebugTemplate>,
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index e5f8feb9..2ae82422 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -116,12 +116,16 @@ impl Client {
// TODO: do we need bufreader/writer here? or do we use async wrappers on unblock?
let writer = BufWriter::new(process.stdin.take().expect("Failed to open stdin"));
let reader = BufReader::new(process.stdout.take().expect("Failed to open stdout"));
- let errors = BufReader::new(process.stderr.take().expect("Failed to open stderr"));
+ let errors = process.stderr.take().map(BufReader::new);
Self::streams(
Box::new(BufReader::new(reader)),
Box::new(writer),
- Some(Box::new(BufReader::new(errors))),
+ // errors.map(|errors| Box::new(BufReader::new(errors))),
+ match errors {
+ Some(errors) => Some(Box::new(BufReader::new(errors))),
+ None => None,
+ },
id,
Some(process),
)
diff --git a/languages.toml b/languages.toml
index 1a557943..6ec5302d 100644
--- a/languages.toml
+++ b/languages.toml
@@ -22,10 +22,8 @@ indent = { tab-width = 4, unit = " " }
[language.debugger]
name = "lldb-vscode"
-transport = "tcp"
+transport = "stdio"
command = "lldb-vscode"
-args = []
-port-arg = "-p {}"
[[language.debugger.templates]]
name = "binary"
@@ -91,10 +89,8 @@ indent = { tab-width = 2, unit = " " }
[language.debugger]
name = "lldb-vscode"
-transport = "tcp"
+transport = "stdio"
command = "lldb-vscode"
-args = []
-port-arg = "-p {}"
[[language.debugger.templates]]
name = "binary"
@@ -121,10 +117,8 @@ indent = { tab-width = 2, unit = " " }
[language.debugger]
name = "lldb-vscode"
-transport = "tcp"
+transport = "stdio"
command = "lldb-vscode"
-args = []
-port-arg = "-p {}"
[[language.debugger.templates]]
name = "binary"