diff options
-rw-r--r-- | helix-core/src/syntax.rs | 1 | ||||
-rw-r--r-- | helix-dap/src/types.rs | 1 | ||||
-rw-r--r-- | helix-term/src/commands.rs | 4 | ||||
-rw-r--r-- | languages.toml | 5 |
4 files changed, 5 insertions, 6 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index cfe5f5a1..ee7aa0eb 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -58,6 +58,7 @@ pub struct LanguageConfiguration { pub(crate) indent_query: OnceCell<Option<IndentQuery>>, #[serde(skip_serializing_if = "Option::is_none")] pub debug_adapter: Option<DebugAdapterConfig>, + // TODO: names for those #[serde(skip_serializing_if = "Option::is_none")] pub debug_configs: Option<Vec<HashMap<String, serde_json::Value>>>, } diff --git a/helix-dap/src/types.rs b/helix-dap/src/types.rs index a31bc1d1..fde3cd80 100644 --- a/helix-dap/src/types.rs +++ b/helix-dap/src/types.rs @@ -5,6 +5,7 @@ use std::path::PathBuf; #[derive(Debug, PartialEq, Clone, Deserialize, Serialize)] #[serde(rename_all = "kebab-case")] pub struct DebugAdapterConfig { + pub name: String, pub transport: String, pub command: String, pub args: Vec<String>, diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 749b8820..c10f94e6 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -4362,10 +4362,10 @@ fn dap_start(cx: &mut Context) { return; } }; - let started = Client::process(config, 0); + let started = Client::process(config.clone(), 0); let (mut debugger, events) = block_on(started).unwrap(); - let request = debugger.initialize("go".to_owned()); + let request = debugger.initialize(config.name); let _ = block_on(request).unwrap(); let sessions = cx diff --git a/languages.toml b/languages.toml index 95d0b177..8f8eb1c1 100644 --- a/languages.toml +++ b/languages.toml @@ -93,20 +93,17 @@ comment-token = "//" language-server = { command = "gopls" } # TODO: gopls needs utf-8 offsets? indent = { tab-width = 4, unit = "\t" } -debug-adapter = { transport = "tcp", command = "dlv", args = ["dap"], port-arg = "-l 127.0.0.1:{}" } +debug-adapter = { name = "go", transport = "tcp", command = "dlv", args = ["dap"], port-arg = "-l 127.0.0.1:{}" } [[language.debug-configs]] -request = "launch" mode = "debug" program = "main.go" [[language.debug-configs]] -request = "launch" mode = "exec" program = "main" [[language.debug-configs]] -request = "launch" mode = "test" program = "." |