diff --git a/.gitmodules b/.gitmodules index 638f607..ae45601 100644 --- a/.gitmodules +++ b/.gitmodules @@ -78,3 +78,6 @@ path = vendor/tree-sitter-julia url = https://github.com/tree-sitter/tree-sitter-julia.git shallow = true +[submodule "vendor/tree-sitter-elm"] + path = vendor/tree-sitter-elm + url = https://github.com/Razzeee/tree-sitter-elm.git diff --git a/Cargo.toml b/Cargo.toml index e7cb4f5..f834f5d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ all = [ "c", "cpp", "css", + "elm", "go", "haskell", "html", @@ -48,6 +49,7 @@ c_sharp = [] c = [] cpp = [] css = [] +elm = [] go = [] haskell = [] html = [] diff --git a/build.rs b/build.rs index 5c9dcd6..09ab133 100644 --- a/build.rs +++ b/build.rs @@ -14,6 +14,8 @@ fn main() { "cpp", #[cfg(feature = "css")] "css", + #[cfg(feature = "elm")] + "elm", #[cfg(feature = "go")] "go", #[cfg(feature = "haskell")] diff --git a/src/ffi.rs b/src/ffi.rs index 1d7d08a..fa7d672 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -11,6 +11,8 @@ extern "C" { fn tree_sitter_cpp() -> Language; #[cfg(feature = "css")] fn tree_sitter_css() -> Language; + #[cfg(feature = "elm")] + fn tree_sitter_elm() -> Language; #[cfg(feature = "go")] fn tree_sitter_go() -> Language; #[cfg(feature = "haskell")] @@ -53,6 +55,8 @@ pub fn filetype_to_language(filetype: &str) -> Option { "cpp" => tree_sitter_cpp, #[cfg(feature = "css")] "css" => tree_sitter_css, + #[cfg(feature = "elm")] + "elm" => tree_sitter_elm, #[cfg(feature = "go")] "go" => tree_sitter_go, #[cfg(feature = "haskell")] diff --git a/vendor/tree-sitter-elm b/vendor/tree-sitter-elm new file mode 160000 index 0000000..37f09fc --- /dev/null +++ b/vendor/tree-sitter-elm @@ -0,0 +1 @@ +Subproject commit 37f09fc8c3f986e0f608cb3d5e87607ade1a09d3