Skip to content

Commit

Permalink
add Clojure
Browse files Browse the repository at this point in the history
  • Loading branch information
bhougland18 committed Mar 25, 2020
1 parent 2fa4b12 commit 49ea013
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@
[submodule "vendor/tree-sitter-elm"]
path = vendor/tree-sitter-elm
url = https://github.com/Razzeee/tree-sitter-elm.git
[submodule "vendor/tree-sitter-clojure"]
path = vendor/tree-sitter-clojure
url = https://github.com/sogaiu/tree-sitter-clojure
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ all = [
"bash",
"c_sharp",
"c",
"clojure",
"cpp",
"css",
"elm",
Expand All @@ -47,6 +48,7 @@ all = [
bash = []
c_sharp = []
c = []
clojure = []
cpp = []
css = []
elm = []
Expand Down
4 changes: 4 additions & 0 deletions src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ extern "C" {
fn tree_sitter_c() -> Language;
#[cfg(feature = "c_sharp")]
fn tree_sitter_c_sharp() -> Language;
#[cfg(feature = "clojure")]
fn tree_sitter_clojure() -> Language;
#[cfg(feature = "cpp")]
fn tree_sitter_cpp() -> Language;
#[cfg(feature = "css")]
Expand Down Expand Up @@ -51,6 +53,8 @@ pub fn filetype_to_language(filetype: &str) -> Option<Language> {
"c" => tree_sitter_c,
#[cfg(feature = "c_sharp")]
"c_sharp" => tree_sitter_c_sharp,
#[cfg(feature = "clojure")]
"clojure" => tree_sitter_clojure,
#[cfg(feature = "cpp")]
"cpp" => tree_sitter_cpp,
#[cfg(feature = "css")]
Expand Down
1 change: 1 addition & 0 deletions vendor/tree-sitter-clojure
Submodule tree-sitter-clojure added at 06a93f

0 comments on commit 49ea013

Please sign in to comment.