Skip to content

Commit

Permalink
[Fix clojure-emacs#949] Define custom cider-default-project-type.
Browse files Browse the repository at this point in the history
Custom var is used with `cider-jack-in` when connecting to
project-less REPLs.
  • Loading branch information
pandeiro committed Jan 16, 2015
1 parent 99f262a commit 3f66b39
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ version from the CIDER package or library.")
:group 'cider
:package-version '(cider . "0.9.0"))

(defcustom cider-default-project-type
"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\")).
Expand Down Expand Up @@ -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-project-type)))
(if (funcall (cider-command-present-p project-type))
(let* ((nrepl-create-client-buffer-function #'cider-repl-create)
(project (when prompt-project
Expand Down

0 comments on commit 3f66b39

Please sign in to comment.