This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-09
Channels
- # announcements (1)
- # arachne (1)
- # beginners (34)
- # boot (5)
- # calva (68)
- # cider (34)
- # cljs-dev (1)
- # clojure (36)
- # clojure-italy (8)
- # clojure-spec (16)
- # clojure-uk (58)
- # clojurescript (29)
- # cursive (2)
- # datascript (9)
- # datomic (3)
- # emacs (10)
- # figwheel (1)
- # figwheel-main (11)
- # fulcro (33)
- # luminus (5)
- # mount (2)
- # nrepl (42)
- # off-topic (3)
- # other-languages (2)
- # parinfer (3)
- # perun (4)
- # prelude (3)
- # re-frame (6)
- # reagent (5)
- # shadow-cljs (23)
- # sql (37)
- # testing (1)
I think there's something like "cider-global-cli-args"? On mobile so I can't look it up right now
@dpsutton Yeah, there’s that, which I currently use, but I want to do something dynamic. Currently, I’ve resorted to
(advice-add 'cider-clojure-cli-jack-in-dependencies :filter-args 'prompt-for-cli-options)
Essentially I want to use cider-jack-in-clj
but I’d like to have some fine grained control when I need it.
So far digging through the source hasn’t turned up a control like that but I could just be looking in the wrong place.
i've looked at it and if you send a prefix arg to cider jack in you can set like everything manually
i need to make a patch that double prefix does that and single prefix prints the jack in command in the minibuffer and lets you edit it as you like
@@ -1156,6 +1156,12 @@ non-nil, don't start if ClojureScript requirements are not met."
(or inferred-type
(cider-select-cljs-repl)))))))
+(defcustom cider-edit-jack-in-command nil
+ "When truthy allow the user to edit the command"
+ :type 'boolean
+ :safe #'booleanp
+ :version '(cider . "0.19.0"))
+
(defun cider--update-jack-in-cmd (params)
"Update :jack-in-cmd key in PARAMS."
(let* ((params (cider--update-do-prompt params))
@@ -1181,8 +1187,11 @@ non-nil, don't start if ClojureScript requirements are not met."
(and (null project-dir)
(eq cider-allow-jack-in-without-project 'warn)
(y-or-n-p "Are you sure you want to run `cider-jack-in' without a Clojure project? ")))
- (let* ((cmd (format "%s %s" command-resolved cmd-params)))
- (plist-put params :jack-in-cmd cmd)))
+ (let ((cmd (format "%s %s" command-resolved cmd-params)))
+ (plist-put params :jack-in-cmd (if (or cider-edit-jack-in-command
+ (plist-get params :edit-jack-in-command))
+ (read-string "jack-in command: " cmd t)
+ cmd))))
(user-error "`cider-jack-in' is not allowed without a Clojure project"))))
(user-error "The %s executable isn't on your `exec-path'" command))))
i think putting this behind single prefix works best so its interactive and not dir locals which are dynamic but not enough
A prefix argument is nice. Another idea is to have an interactive function which always prompts sort of like sql-postgres
etc. though I’d want to spend some time experimenting with that.
Essentially that’s what the hack I mentioned does. It just prompts for additional args.
I'm for sure interested in what works well for you. I think lots of people want it. Bruce was interested in something like this too I think
I’m embarrassed to admit I don’t really use prefix args because, heh, I don’t know how to do that in evil. 😛
Right. I was prompted to look in to this because I noticed :style/indent
wasn’t being respected in a .cljs
file.
Turned out my suspicion that it was related to not loading up the right :alias
was the issue.
Now that I can specify -A:client
(which is my cljs side of the house) the indention works out fine.
following a discussion on #beginners i put [cider/cider-nrepl "0.20.0"]
in my project.clj file and ran lein deps
and restarted a lein repl. When I use cider-connect
I'm seeing this warning: WARNING: CIDER requires cider-nrepl to be fully functional. Many things will not work without it!