Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support built-in project.el for getting project name #24

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion activity-watch-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
:type 'string
:group 'activity-watch)

(defcustom activity-watch-project-name-resolvers '(projectile magit-dir-force magit-origin)
(defcustom activity-watch-project-name-resolvers '(projectile project magit-dir-force magit-origin)
"List of resolvers used to find the project name.

When determining the name of a project, the watcher will go down the list
Expand Down Expand Up @@ -144,6 +144,10 @@ use it to find the project's name." docstring)
(when (require ,feature nil t)
,@body)))))

(activity-watch--gen-feature-resolver 'project project
(when (project-current)
(project-name (project-current))))

(activity-watch--gen-feature-resolver 'projectile projectile
(when (projectile-project-p)
(projectile-project-name)))
Expand Down