From e3c4edae32f6d70bf20655c7c25b3cdf39f3f281 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Thu, 25 Mar 2021 15:26:25 +0900 Subject: Add the machinery to load syntax config from TOML. It's embedded into the binary at build time for now, but it's progress. --- helix-syntax/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helix-syntax/src/lib.rs') 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, -- cgit v1.2.3-70-g09d2