aboutsummaryrefslogtreecommitdiff
path: root/helix-syntax/src/lib.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-25 06:26:25 +0000
committerBlaž Hrastnik2021-03-25 06:26:25 +0000
commite3c4edae32f6d70bf20655c7c25b3cdf39f3f281 (patch)
tree5351a5a797de5f213b87f25ae4ba049c8e74d11b /helix-syntax/src/lib.rs
parenta900159a863c24e4afb1485d8dcff760f722f36b (diff)
Add the machinery to load syntax config from TOML.
It's embedded into the binary at build time for now, but it's progress.
Diffstat (limited to 'helix-syntax/src/lib.rs')
-rw-r--r--helix-syntax/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-syntax/src/lib.rs b/helix-syntax/src/lib.rs
index 64fe1023..5d3e0d99 100644
--- a/helix-syntax/src/lib.rs
+++ b/helix-syntax/src/lib.rs
@@ -1,3 +1,4 @@
+use serde::{Deserialize, Serialize};
use tree_sitter::Language;
#[macro_export]
@@ -12,7 +13,8 @@ macro_rules! mk_extern {
#[macro_export]
macro_rules! mk_enum {
( $( $camel:ident ),* ) => {
- #[derive(Clone, Copy, Debug, PartialEq)]
+ #[derive(Clone, Copy, Debug, PartialEq, Serialize, Deserialize)]
+ #[serde(rename_all = "lowercase")]
pub enum Lang {
$(
$camel,