-
-
Notifications
You must be signed in to change notification settings - Fork 249
[Fix #451] respect project root dir suggested by custom function #452
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
Changes from 2 commits
beed375
5ffb46c
3e58acd
766fc5b
cd71981
607a2ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -192,6 +192,11 @@ Out-of-the box `clojure-mode' understands lein, boot and gradle." | |
| (and (listp value) | ||
| (cl-every 'stringp value)))) | ||
|
|
||
| (defcustom clojure-project-root-locating-function nil | ||
|
||
| "Alternative function to locate clojure project root directory, eg. projectile-project-root" | ||
|
||
| :type 'symbol | ||
|
||
| :safe 'symbolp) | ||
|
||
|
|
||
| (defcustom clojure-refactor-map-prefix (kbd "C-c C-r") | ||
| "Clojure refactor keymap prefix." | ||
| :type 'string | ||
|
|
@@ -1607,8 +1612,12 @@ Return nil if not inside a project." | |
| (mapcar (lambda (fname) | ||
| (locate-dominating-file dir-name fname)) | ||
| clojure-build-tool-files)))) | ||
| (when (> (length choices) 0) | ||
| (car (sort choices #'file-in-directory-p))))) | ||
| (or (and (fboundp clojure-project-root-locating-function) | ||
|
||
| (condition-case err | ||
|
||
| (funcall clojure-project-root-locating-function) | ||
| (error nil))) | ||
| (when (> (length choices) 0) | ||
| (car (sort choices #'file-in-directory-p)))))) | ||
|
|
||
| (defun clojure-project-relative-path (path) | ||
| "Denormalize PATH by making it relative to the project root." | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name this just
clojure-project-root-function.