aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/Cargo.toml1
-rw-r--r--helix-core/src/indent.rs1
-rw-r--r--helix-core/src/lib.rs2
-rw-r--r--helix-core/src/syntax.rs37
4 files changed, 40 insertions, 1 deletions
diff --git a/helix-core/Cargo.toml b/helix-core/Cargo.toml
index 8c83816c..d26ff953 100644
--- a/helix-core/Cargo.toml
+++ b/helix-core/Cargo.toml
@@ -14,6 +14,7 @@ include = ["src/**/*", "README.md"]
[dependencies]
helix-syntax = { version = "0.4", path = "../helix-syntax" }
+helix-dap = { version = "0.4", path = "../helix-dap" }
ropey = "1.3"
smallvec = "1.4"
diff --git a/helix-core/src/indent.rs b/helix-core/src/indent.rs
index f5f36aca..4b74aa7a 100644
--- a/helix-core/src/indent.rs
+++ b/helix-core/src/indent.rs
@@ -458,6 +458,7 @@ where
unit: String::from(" "),
}),
indent_query: OnceCell::new(),
+ debugger: None,
}],
});
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index d971464a..0854eb04 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -195,7 +195,7 @@ pub use {regex, tree_sitter};
pub use graphemes::RopeGraphemes;
pub use position::{coords_at_pos, pos_at_coords, Position};
pub use selection::{Range, Selection};
-pub use smallvec::SmallVec;
+pub use smallvec::{smallvec, SmallVec};
pub use syntax::Syntax;
pub use diagnostic::Diagnostic;
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index 64b921e6..cabfe083 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -55,6 +55,8 @@ pub struct LanguageConfiguration {
#[serde(skip)]
pub(crate) indent_query: OnceCell<Option<IndentQuery>>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub debugger: Option<DebugAdapterConfig>,
}
#[derive(Debug, Serialize, Deserialize)]
@@ -66,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 {