This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-15
Channels
- # architecture (5)
- # babashka (34)
- # beginners (72)
- # calva (42)
- # cherry (31)
- # cider (14)
- # clojure (27)
- # clojure-europe (11)
- # clojure-norway (17)
- # clojure-uk (1)
- # clojurescript (25)
- # community-development (13)
- # conjure (1)
- # core-async (11)
- # datascript (18)
- # datomic (11)
- # emacs (12)
- # fulcro (10)
- # integrant (5)
- # introduce-yourself (3)
- # jobs (8)
- # juxt (2)
- # malli (22)
- # off-topic (11)
- # pathom (18)
- # polylith (62)
- # rdf (18)
- # reagent (8)
- # releases (1)
- # shadow-cljs (35)
- # sql (3)
- # squint (141)
- # tools-deps (12)
- # vim (4)
- # xtdb (4)
how would i go about adding project specific hooks like this? (add-hook 'cider-connected-hook #'inspire-on-connect)
bc one inspiring message isn't enough to get me going anymore.
I want to use the dir-localse.el, but i'm not sure it supports this, i still have to read the dir-locals https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html everytime and it's still not clear all what you can do inthere.
maybe something like (eval . (add-hook?) ...
yes! that seems to work. The dot is for dotted pair notation, i'm not sure of it's role here though...
thanks! my current way of learning how to do this stuff is poking through the cider docs and asking questions here. If you know of any more structured approaches that aren't eating the whole elephant that would be great.
yeah, the same way I usually learn these things. mind that overloading .dir-locals.el may not be cheered by collaborators (assuming it's not a personal project). You can use .dir-locals-2.el and add it to .gitignore. That way .dir-locals.el still can be pushed into the repo, and your personal settings would be separated.
i have the dir-local gitignored currently... but thats good to know. it would make sense to expose it if it can house project specific stuff...
Another issue you will stumble on pretty soon is forcing Emacs to "renew" updated dir-locals. Since they are per project, executing (hack-dir-local-variables)
is not enough. You're gonna have to kill and reopen every single open buffer in the project. Otherwise, you may end up calling cider-jack-in from the root-dir and have different results than if you call it from some buffer. Buffers will have different buffer-local variables.
in spacemacs it's enough to do SPC o R aka revert-buffers. And this is why i support praticalli, because i'm not sure i would ever have figured that one out without asking him 🙂
That's not exactly the thing, but if it works - it works. See this reddit comment https://www.reddit.com/r/emacs/comments/w9p2oo/resetting_dirlocalsel/ii5w1u1/?context=3
I see, i didn't read your prevoius message carefully enough.