Fork me on GitHub

When running cider-format-buffer I am getting this error Wrong type argument: arrayp, nil. Im new to the emacs ecosystem and im not sure how to debug this. Any help is much appreciated!


fixed it. was a problem with boot where the nREPL middleware wasnt injected.


THANK YOU CIDER PEEPS! I have got basic stuff working in Kakoune, and I'll have so much more working soon because of your work.

❤️ 1

Tell me more!


If I can switch to kak, that would be exciting


It's still really really rough. But I have mapped ,ee to evaluate a form, and ,ef to evaluate a file. rep will need a bunch more options. I'll get symbol info next, (clojure-lsp can do this with kak-lsp, but it's stopped working for me and I haven't looked into it).


I'm thinking a lot about how to make a Kakoune repl buffer.


And running tests will be soon, since that's how I work.


Is the replant code useful at all for figuring this stuff out?


I'm not sure. I've been reading cider.el, and I remember some details of vim-fireplace.


Kakoune really wants tiny shell programs to do things, which is a philosophy I can dig, so I've been making it work that way.


Me too, but replant has logic which I think you can reuse.


OK, queueing up for night-time reading :D


I think I've looked at it before, but not while thinking about how to work with Kakoune.


I'm thinking about how to make rep have a persistent "session" when rep will never stay around persistently.


I've seen evidence in the nrepl code that it's been thought about, but not implemented. Specifically, the ability to subscribe to :out and :err for a session.


@jumar @tristram deftest is a macro which probably explains why trying to attach the cider debugger to it fails, as the macro creates a new function with the name you gave, but the body of the test associated with the :test metadata on that function.


As I said it works without problems as long as you run tests via run-tests et Al. I believe the problem is that cider evaluates the whole namespace when it runs tests which effectively removes breakpoints


top learning, guys. Thank you very much


we do TDD at work (currently in Cursive), so debugging tests is a huge part of my life - I'll post here when I figure it all out 👌


(defmacro deftest
  "Defines a test function with no arguments.  Test functions may call
  other tests, so tests may be composed.  If you compose tests, you
  should also define a function named test-ns-hook; run-tests will
  call test-ns-hook instead of testing all vars.

  Note: Actually, the test body goes in the :test metadata on the var,
  and the real function (the value of the var) calls test-var on

  When *load-tests* is false, deftest is ignored."
  {:added "1.1"}
  [name & body]
  (when *load-tests*
    `(def ~(vary-meta name assoc :test `(fn [] [email protected]))
          (fn [] (test-var (var ~name))))))


I suspect its the confluence of how cider debugging decides to drop the debugger off of re-evaluated functions, and how deftest builds a test on a function.