This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (2)
- # beginners (25)
- # boot (12)
- # cider (73)
- # cljs-dev (3)
- # clojure (37)
- # clojure-dev (93)
- # clojure-germany (1)
- # clojure-italy (24)
- # clojure-nl (21)
- # clojure-russia (26)
- # clojure-spec (37)
- # clojure-uk (80)
- # clojure-za (1)
- # clojurescript (47)
- # cursive (4)
- # data-science (17)
- # datomic (69)
- # emacs (19)
- # events (7)
- # fulcro (41)
- # hoplon (14)
- # leiningen (2)
- # nrepl (4)
- # off-topic (253)
- # om (11)
- # portkey (2)
- # re-frame (11)
- # reagent (24)
- # ring-swagger (1)
- # rum (5)
- # schema (1)
- # shadow-cljs (106)
- # specter (2)
- # tools-deps (91)
is it possible to (deliberately) drop a cider connection without also killing the associated buffer ? i quite often want to keep my session history, but connect to a different vm...
cider-connections-close-connection both kill the buffer
@mccraigmccraig I think it was possible at some point, but not anymore. Before we had two different buffers - connection buffer and repl buffer and we could attach a connection to any REPL buffer. Now the REPL and the connection are the same. Maybe we can think of something, though. File some ticket on the issue tracker and we can discuss this further there.
is there some kind of hook to turn off cider-mode introduced recently? I've found I've had to enable cider-mode in quite a few clj/cljs buffers
@dpsutton I thought I was crazy but now that you mention it, I have had the same!
yeah it keeps asking me for a tags file. and then i
cider-mode and then life is good again. super strange
Uhm haven't seen the tag file thing but cider mode was turned off in some buffers, i have eval in
.dir-locals.el and this might mean
cider-mode in a switch now..not enable only..maybe?
How do I define an indent spec so that the second line is always just indented one space regarless of what's on the first line? I feel like I've tried everything in the indent_spec docs but can't seem to get this to work
(h/div :class "container" (h/h1 "title")
The former does 2 spaces instead of one and the latter aligns with the first arg
(define-clojure-indent (div '(:defn))) (define-clojure-indent (div 0))
@richiardiandrea when you ask to navigate to symbol and cider mode isn't on that's what you'll get. an option to select a tags file
I have a clojure function for reformatting a file how can I make a cider keybinding to apply this to a file, presumably by evaling some code in the repl?
I have a clojure function, so I need to know what elisp to write to tie them together
it could either work by supplying the whole contents of the buffer to the clojure function and replacing the buffer with the return value, or by supplying a filename and then running revert
Btw, what does your function do exactly? You do know that cider has integration with
what function can I use to lookup values in a
(dict ...)? I tried
get-hash but that didn't work
> it could either work by supplying the whole contents of the buffer to the clojure function and replacing the buffer with the return value, or by supplying a filename and then running revert
You can also extend the code formatting functionality that exists today and just leverage whatever else exists for the code formatting already.
The part about the newline in the end can be done by Emacs itself. No need for a clojure function to do this IMO. Every editor can ensure a trailing newline.
yes, but I already have a clojure function because this also gets used e.g. in CI and by people who don't use emacs
there were functions you could invoke called
cider-before-refresh-fn and after but they seem to be gone now. they were strings that were evaled in clojure before and after refreshing. you could see how those are used if you're on an older CIDER
I'm having trouble with calling
(revert-buffer) in my callback; I guess elisp lambdas aren't closures?
(let ((buffer ...)) (lambda (resp) ...))
one thing to try: instead of remembering the buffer, remember the buffer name and then try
(with-current-buffer buffer-name.... just to see if your logic is correct. also, do you know how to debug elisp?
that also seems to be sending
(./lint-fix. I didn't know that was a valid name in clojure. and i don't think it is
considering the error is
void-variable it would be weird if switching to buffer-name worked
I tried it anyhow, and it didn't work
it's dynamic. and there is no binding
callback-buffer when that lambda is run (dynamic). but there is one at definition time if its lexical
I had a let binding
(let ((comment-start ... and at some point moved sexp forward. this broke emacs because comment-start is a global regex defining what comments look like