summaryrefslogtreecommitdiff
path: root/cider.el
diff options
context:
space:
mode:
authorMurphy McMahon <pandeiro@gmail.com>2015-01-16 10:56:09 -0200
committerMurphy McMahon <pandeiro@gmail.com>2015-01-16 14:31:23 -0200
commit73f92717fc0c25a48afa122bfee4ada38fecb35b (patch)
treee3c8351941e0486146c507a73c4e5cd7b755a9ff /cider.el
parent99f262a97b598d72b756b629d053cd0828658d6e (diff)
[Fix #949] Define custom cider-default-repl-command.
Custom var is used with `cider-jack-in` when connecting to project-less REPLs.
Diffstat (limited to 'cider.el')
-rw-r--r--cider.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/cider.el b/cider.el
index 6a0bfadb..ad4e7c8e 100644
--- a/cider.el
+++ b/cider.el
@@ -98,6 +98,15 @@ version from the CIDER package or library.")
:group 'cider
:package-version '(cider . "0.9.0"))
+(defcustom cider-default-repl-command
+ "lein"
+ "Determines the default command and parameters to use when connecting to nREPL.
+This value will only be consulted when no identifying file types, ie project.clj for
+leiningen or build.boot for boot, could be found."
+ :type 'string
+ :group 'cider
+ :package-version '(cider . "0.9.0"))
+
(defcustom cider-known-endpoints nil
"Specify a list of custom endpoints where each endpoint is a list.
For example: '((\"label\" \"host\" \"port\")).
@@ -158,7 +167,7 @@ If PROMPT-PROJECT is t, then prompt for the project for which to
start the server."
(interactive "P")
(setq cider-current-clojure-buffer (current-buffer))
- (let ((project-type (cider-project-type)))
+ (let ((project-type (or (cider-project-type) cider-default-repl-command)))
(if (funcall (cider-command-present-p project-type))
(let* ((nrepl-create-client-buffer-function #'cider-repl-create)
(project (when prompt-project