This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (3)
- # aws (11)
- # babashka (5)
- # beginners (116)
- # cider (30)
- # clara (1)
- # clj-kondo (15)
- # clojure (17)
- # clojure-dev (9)
- # clojure-europe (2)
- # clojure-italy (1)
- # clojure-uk (3)
- # clojurescript (9)
- # conjure (3)
- # crux (9)
- # duct (22)
- # exercism (1)
- # fulcro (8)
- # graalvm (5)
- # graphql (3)
- # helix (3)
- # joker (3)
- # kaocha (2)
- # off-topic (9)
- # pathom (4)
- # re-frame (1)
- # rum (6)
- # shadow-cljs (81)
- # sql (6)
Hi, I need to be able do detach the cider process such as when I exit emacs,
cider-jack-in-cljs doesn't fetch dependencies again. Is that possible?
Unless I miss-understand what you are doing, project dependencies for projects are saved locally, so unless you update the versions of dependencies then they are only downloaded once.
yes, but for some reason, there are still fetches happening. When I deactivate my VPN (where the dependencies are downloaded), I cannot jack-in.
You can start the JVM process from a shell and then connect to it from Emacs using
cider-connect-cljs . If you need to know what Cider is running when you call
cider-jack-in, you could look in
*messages* where Emacs logs to, or jack in and look in your process list, but it tries to detect what you're using to start your REPL (lein, boot, clj) and injects some dependencies for things like Cider middleware. These are controlled by your settings in Cider.
(the issue here is that in my case, fetching dependencies takes a lot of time, and I restart emacs quite often)
Why are you restarting Emacs so often? I only restart when I reboot. I start Emacs with --daemon and run
emacsclient -c -nw file.clj when I want to edit something from the terminal (and
C-x # to tell Emacs I'm done editing that file or
C-x 5 0 to close the frame). I also have this in my
bindkey -s "^x^f" $'^aemacsclient -c -nw ' for those times when I accidentally hit
C-x C-f in the terminal ;)
Is there a list of all the variables I can set in CIDER? I am creating some example .dir-locals.el files and would like to know what is possible. There are many examples sprinkled in the documentation, https://docs.cider.mx/cider/0.25/config/basic_config.html but it would be useful to have a list of them for reference.
Are they all
defcustom names in the cider project? If so, I can use helm-ag to grab them.
I created this list from all the defcustom definitions in the CIDER project, there are quite a few. https://practicalli.github.io/spacemacs/reference/cider/configuration-variables.html
I never use it myself, but it’s still a great way to list all the config options of a certain package.
haha. its great as is since the names are usually descriptive but pointing people to this who might not have the emacs chops to search for vars or know how to do that would be nice. also, maybe a little tutorial on the header of how to do this inside emacs
I am wondering how to do a search across a project that shows the matching line and the line below. I have helm, helm-swoop and projectile. helm-swoop does multi-line but doesnt seem to work across a whole project.
i think using elisp to do this would be easier. then you could use sexp-navigation as it should be
defcustom name docstring value or
defcustom name value. you could capture that and use parseedn to perhaps spit it out as edn?
Oh, if only I had learned elips already... I am still at the copy something from the internet stage...
yeah its clunky at times. i feel slow in it but if you wrote it every day i think it would be easy
(let (defcustoms) (dolist (file (directory-files "/Users/dan/projects/dev/cider" t "\.el")) (unless (string-match-p "dir-locals" file) (with-current-buffer (find-file file) (goto-char (point-min)) (while (re-search-forward "defcustom" nil t) (let ((custom (substring-no-properties (progn (paredit-forward 1) (thing-at-point 'sexp)))) (docstring (substring-no-properties (progn (paredit-forward 2) (or (thing-at-point 'sexp) "no docstring provided"))))) (push (list (file-name-nondirectory file) custom docstring) defcustoms)))))) (with-current-buffer (get-buffer-create "*defcustoms-from-cider*") (dolist (dc defcustoms) (insert (car dc) " : " (cadr dc) " : " (caddr dc) "\n"))))
nrepl-client.el : nrepl-message-colors : "Colors used in the messages buffer." ============== nrepl-client.el : nrepl-log-messages : "If non-nil, log protocol messages to an nREPL messages buffer. This is extremely useful for debug purposes, as it allows you to inspect the communication between Emacs and an nREPL server. Enabling the logging might have a negative impact on performance, so it's not recommended to keep it enabled unless you need to debug something." ============== nrepl-client.el : nrepl-hide-special-buffers : "Control the display of some special buffers in buffer switching commands. When true some special buffers like the server buffer will be hidden."
(let (defcustoms) (dolist (file (directory-files "/Users/dan/projects/dev/cider" t "\.el")) (unless (string-match-p "dir-locals" file) (with-current-buffer (find-file file) (goto-char (point-min)) (while (re-search-forward "defcustom" nil t) (let ((custom (substring-no-properties (progn (paredit-forward 1) (thing-at-point 'sexp)))) (docstring (substring-no-properties (progn (paredit-forward 2) (or (thing-at-point 'sexp) "no docstring provided"))))) (push (list (file-name-nondirectory file) custom docstring) defcustoms)))))) (with-current-buffer (get-buffer-create "*defcustoms-from-cider*") (erase-buffer) (dolist (dc defcustoms) (insert (car dc) " : " (cadr dc) " : " (caddr dc) "\n==============\n"))))
Hmm, when I run this script in ielm it openes all the .el files and then seems to stop. A defcustoms-from-cider buffer is not created, or if it is its deleted (assuming that may be what (erase-buffer) does. but I only get nil as the return value, so maybe the information is output elsewhere, but I dont understand where.. Its time for me to sleep, so will take another look in the morning.