diff options
author | Maarten Mulders <mthmulders@users.noreply.github.com> | 2019-10-07 12:18:01 +0200 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-10-07 19:18:01 +0900 |
commit | 8058b51273e16795e8e5ee4741b2556b44700506 (patch) | |
tree | 06e66a39b3807aba85bfca7b5cbd792cc1dac5c4 | |
parent | 72fbd5b1ba67426265be9c75344aae2f055e4de8 (diff) |
feat: Show Java module when build.sbt is present (#505)
* feat: Show Java icon and info when build.sbt detected
* docs: Mention build.sbt detection
-rw-r--r-- | docs/config/README.md | 2 | ||||
-rw-r--r-- | src/modules/java.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 2f07909b6..f3907c275 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -712,7 +712,7 @@ style = "bold dimmed green" The `java` module shows the currently installed version of Java. The module will be shown if any of the following conditions are met: -- The current directory contains a `pom.xml` or `build.gradle` file +- The current directory contains a `pom.xml`, `build.gradle` or `build.sbt` file - The current directory contains a file with the `.java`, `.class` or `.jar` extension ### Options diff --git a/src/modules/java.rs b/src/modules/java.rs index 9bd9c736f..bd4e3c807 100644 --- a/src/modules/java.rs +++ b/src/modules/java.rs @@ -8,11 +8,11 @@ use super::{Context, Module}; /// /// Will display the Java version if any of the following criteria are met: /// - Current directory contains a file with a `.java`, `.class` or `.jar` extension -/// - Current directory contains a `pom.xml` or `build.gradle` file +/// - Current directory contains a `pom.xml`, `build.gradle` or `build.sbt` 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"]) + .set_files(&["pom.xml", "build.gradle", "build.sbt"]) .set_extensions(&["java", "class", "jar"]) .is_match(); |