aboutsummaryrefslogtreecommitdiff
path: root/helix-core/src
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-29 11:51:47 +0000
committerDmitry Sharshakov2021-08-29 11:51:47 +0000
commitb42631942b74b2f5ac5c955343861518c38282e8 (patch)
tree4e65d987e3cca61c59bf8a6141738c1915c36939 /helix-core/src
parentf53d8411cbda6119bcd34d5936fc23c1365bafef (diff)
Defaults in completions, better schema
Diffstat (limited to 'helix-core/src')
-rw-r--r--helix-core/src/syntax.rs36
1 files changed, 35 insertions, 1 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index a7410203..cabfe083 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -5,7 +5,6 @@ use crate::{
Rope, RopeSlice, Tendril,
};
-use helix_dap::DebugAdapterConfig;
pub use helix_syntax::get_language;
use arc_swap::ArcSwap;
@@ -69,6 +68,41 @@ pub struct LanguageServerConfiguration {
pub args: Vec<String>,
}
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "kebab-case")]
+pub struct AdvancedCompletion {
+ pub name: Option<String>,
+ pub completion: Option<String>,
+ pub default: Option<String>,
+}
+
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "kebab-case", untagged)]
+pub enum DebugConfigCompletion {
+ Named(String),
+ Advanced(AdvancedCompletion),
+}
+
+#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
+#[serde(rename_all = "kebab-case")]
+pub struct DebugTemplate {
+ pub name: String,
+ pub request: String,
+ pub completion: Vec<DebugConfigCompletion>,
+ pub args: HashMap<String, String>,
+}
+
+#[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>,
+ pub port_arg: Option<String>,
+ pub templates: Vec<DebugTemplate>,
+}
+
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct IndentationConfiguration {