diff options
author | Zane Shelby <zane@users.noreply.github.com> | 2020-11-30 07:50:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 13:50:56 +0100 |
commit | 389e006c00fe50aac98c7ca9e3cbdee6dab2e35e (patch) | |
tree | 511d7b156622335116505f975b6ad9e36d530432 /src | |
parent | f87af93d93f4e414387639d368eb19683955e45f (diff) |
feat(java): Show Java module for Clojure projects (#966)
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/java.rs | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/modules/java.rs b/src/modules/java.rs index e06182e3f..2731bf6d2 100644 --- a/src/modules/java.rs +++ b/src/modules/java.rs @@ -11,13 +11,21 @@ const JAVA_VERSION_PATTERN: &str = "(?P<version>[\\d\\.]+)[^\\s]*\\s(?:built|fro /// Creates a module with the current Java version /// /// Will display the Java version if any of the following criteria are met: -/// - Current directory contains a file with a `.java`, `.class`, `.gradle` or `.jar` extension -/// - Current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt` or `.java-version` file +/// - Current directory contains a file with a `.java`, `.class`, `.jar`, `.gradle`, `.clj`, or `.cljc` extension +/// - Current directory contains a `pom.xml`, `build.gradle.kts`, `build.sbt`, `.java-version`, `deps.edn`, `project.clj`, or `build.boot` file pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> { let is_java_project = context .try_begin_scan()? - .set_files(&["pom.xml", "build.gradle.kts", "build.sbt", ".java-version"]) - .set_extensions(&["java", "class", "jar", "gradle"]) + .set_files(&[ + "pom.xml", + "build.gradle.kts", + "build.sbt", + ".java-version", + "deps.edn", + "project.clj", + "build.boot", + ]) + .set_extensions(&["java", "class", "jar", "gradle", "clj", "cljc"]) .is_match(); if !is_java_project { |