on master help sign in
config: minor fixes
commitb6b99b248783583bdcc2439a78b503a31cbbcce8 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateMon 23 Aug 2021, 17:26 (5 years ago) parent839d210
4 files changed+5−6
helix-core/src/syntax.rs+1 helix-dap/src/types.rs+1 helix-term/src/commands.rs+2−2 languages.toml+1−4
helix-core/src/syntax.rs+1
@@ -58,6 +58,7 @@ pub struct LanguageConfiguration {
5858 pub(crate) indent_query: OnceCell<Option<IndentQuery>>,
5959 #[serde(skip_serializing_if = "Option::is_none")]
6060 pub debug_adapter: Option<DebugAdapterConfig>,
61+ // TODO: names for those
6162 #[serde(skip_serializing_if = "Option::is_none")]
6263 pub debug_configs: Option<Vec<HashMap<String, serde_json::Value>>>,
6364}
helix-dap/src/types.rs+1
@@ -5,6 +5,7 @@ use std::path::PathBuf;
55#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
66#[serde(rename_all = "kebab-case")]
77pub struct DebugAdapterConfig {
8+ pub name: String,
89 pub transport: String,
910 pub command: String,
1011 pub args: Vec<String>,
helix-term/src/commands.rs+2−2
@@ -4362,10 +4362,10 @@ fn dap_start(cx: &mut Context) {
43624362 return;
43634363 }
43644364 };
4365− let started = Client::process(config, 0);
4365+ let started = Client::process(config.clone(), 0);
43664366 let (mut debugger, events) = block_on(started).unwrap();
43674367
4368− let request = debugger.initialize("go".to_owned());
4368+ let request = debugger.initialize(config.name);
43694369 let _ = block_on(request).unwrap();
43704370
43714371 let sessions = cx
languages.toml+1−4
@@ -93,20 +93,17 @@ comment-token = "//"
9393language-server = { command = "gopls" }
9494# TODO: gopls needs utf-8 offsets?
9595indent = { tab-width = 4, unit = "\t" }
96−debug-adapter = { transport = "tcp", command = "dlv", args = ["dap"], port-arg = "-l 127.0.0.1:{}" }
96+debug-adapter = { name = "go", transport = "tcp", command = "dlv", args = ["dap"], port-arg = "-l 127.0.0.1:{}" }
9797
9898[[language.debug-configs]]
99−request = "launch"
10099mode = "debug"
101100program = "main.go"
102101
103102[[language.debug-configs]]
104−request = "launch"
105103mode = "exec"
106104program = "main"
107105
108106[[language.debug-configs]]
109−request = "launch"
110107mode = "test"
111108program = "."
112109