[英]'cider-jack-in' run clojure instead leiningen without a clojure project
我試圖在沒有Clojure項目的情況下從emacs執行“蘋果酒劫持”,而我只是想運行Clojure REPL。 但我發現,蘋果酒試圖運行/usr/local/bin/clojure
,而不是/usr/local/bin/lein
這不是指我profiles.clj
為Leiningen設置。 當我嘗試Clojure項目時,通常與lein
一起使用。
我想知道是否有任何原因,即使我在終端機上沒有Clojure項目的情況下嘗試lein repl
時也沒有問題(我曾希望Cider能夠這樣做),以及一種在沒有Clojure項目的情況下通過Cider運行Leiningen的方式。
我對此表示感謝。
在CIDER 0.18(當前穩定版本)上,您需要將cider-jack-in-default
為符號,而不是字符串(例如'lein
)。
(define-obsolete-variable-alias 'cider-default-repl-command 'cider-jack-in-default)
(defcustom cider-jack-in-default (if (executable-find "clojure") 'clojure-cli 'lein)
"The default tool to use when doing `cider-jack-in' outside a project.
This value will only be consulted when no identifying file types, i.e.
project.clj for leiningen or build.boot for boot, could be found.
As the Clojure CLI is bundled with Clojure itself, it's the default.
In the absence of the Clojure CLI (e.g. on Windows), we fallback
to Leiningen."
:type '(choice (const 'lein)
(const 'boot)
(const 'clojure-cli)
(const 'shadow-cljs)
(const 'gradle))
:group 'cider
:safe #'symbolp
:package-version '(cider . "0.9.0"))
老變量確實帶了一個字符串,這是真的。 沒有看到完整的堆棧跟蹤信息,我無法確定到底是什么問題。 通常,最好在CIDER的問題跟蹤器中提出此類問題。
如果有人想知道為什么lein
現在使用clojure-cli
而不是lein
來進行lein
項目的REPL-我們的想法是Clojure CLI是我們可以假定每個Clojure用戶都擁有的唯一工具,因此它提供了一個更安全的默認值。
試試: (setq cider-jack-in-default 'lein)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.