aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurence Warne <laurencewarne@gmail.com>2025-02-13 09:53:37 +0000
committerBozhidar Batsov <bozhidar@batsov.dev>2025-02-13 12:37:53 +0100
commit827fa6555cf40801c11cab65a7231a340758352f (patch)
treebf567c25cd319e09d13c65edc85d84d8c3f1cd1a
parentef17d2971bbcce13b1ac16e0e36d44fa0defca63 (diff)
Add build.mill as a project file name for the mill project type
Add build.mill as a project file name for the mill project type, it seems to be the recommended extension now, see https://mill-build.org/mill/scalalib/intro.html.
-rw-r--r--projectile.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/projectile.el b/projectile.el
index ac61fd8..ce67447 100644
--- a/projectile.el
+++ b/projectile.el
@@ -2902,7 +2902,8 @@ ones and overrule settings in the other lists."
A project type is defined by PROJECT-TYPE, a set of MARKER-FILES,
and optional keyword arguments:
-PROJECT-FILE the main project file in the root project directory.
+PROJECT-FILE the main project file in the root project directory. It may be a
+ single file or a list of possible files.
COMPILATION-DIR the directory to run the tests- and compilations in,
CONFIGURE which specifies a command that configures the project
`%s' in the command will be substituted with (projectile-project-root)
@@ -2955,7 +2956,8 @@ files such as test/impl/other files as below:
A project type is defined by PROJECT-TYPE, a set of MARKER-FILES,
and optional keyword arguments:
-PROJECT-FILE the main project file in the root project directory.
+PROJECT-FILE the main project file in the root project directory. It may be a
+ single file or a list of possible files.
COMPILATION-DIR the directory to run the tests- and compilations in,
CONFIGURE which specifies a command that configures the project
`%s' in the command will be substituted with (projectile-project-root)
@@ -3128,6 +3130,13 @@ it acts on the current project."
(or (projectile-verify-file "go.mod" dir)
(projectile-verify-file-wildcard "*.go" dir)))
+(defun projectile-mill-project-p (&optional dir)
+ "Check if a project contains a mill build file.
+When DIR is specified it checks DIR's project, otherwise
+it acts on the current project."
+ (or (projectile-verify-file "build.mill" dir)
+ (projectile-verify-file "build.sc" dir)))
+
(defcustom projectile-go-project-test-function #'projectile-go-project-p
"Function to determine if project's type is go."
:group 'projectile
@@ -3538,8 +3547,8 @@ a manual COMMAND-TYPE command is created with
:test "sbt test"
:test-suffix "Spec")
-(projectile-register-project-type 'mill '("build.sc")
- :project-file "build.sc"
+(projectile-register-project-type 'mill #'projectile-mill-project-p
+ :project-file '("build.sc" "build.mill")
:src-dir "src/"
:test-dir "test/src/"
:compile "mill __.compile"