This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-24
Channels
- # announcements (1)
- # babashka (86)
- # beginners (75)
- # boot-dev (1)
- # cljdoc (18)
- # cljs-dev (1)
- # cljsrn (67)
- # clojure (127)
- # clojure-australia (1)
- # clojure-dev (2)
- # clojure-europe (9)
- # clojure-nl (2)
- # clojure-serbia (2)
- # clojure-spec (11)
- # clojure-uk (14)
- # clojurescript (17)
- # code-reviews (4)
- # conjure (37)
- # core-async (11)
- # datomic (21)
- # emacs (1)
- # helix (36)
- # jobs (6)
- # malli (1)
- # meander (20)
- # re-frame (13)
- # reagent (49)
- # remote-jobs (11)
- # rum (1)
- # sci (1)
- # shadow-cljs (29)
- # sql (17)
- # vim (2)
For those of you that use Telescope, I used Conjure to create a way to fuzzy find links in markdown files, and open them with any application you want to (default = open
on macOS, x-www-browser
otherwise). It's a first draft, but it works! 🙂
https://willfennel.com/posts/2021/05/23/neovim-telescope-markdown-link-handler.html
(Sorry for the layout of that site, I created it this weekend and I'm still fixing stuff.)
I actually liked the simple layout 😅 Only thing missing for my part is a demo to get me hooked
Yeah I still need to set up something like asciinema to create a demo, thanks for the feedback! Oh and I fixed the styling anyway 😛
Do you need any new config to use the bb auto nrepl? I have 4.19.0 installed and it doesn’t auto start when I open a Clj file
It's only on the develop
branch for a little while to give people a chance to try it out before I force it on others 🙂 just in case it breaks some common essential workflow.
It's also got a switch to turn it off completely, but I want to give it some trial time first.
Wonderful! Since I'm inserting it into an early common point of the workflow I was worried it'd break some users assumptions and config.
Now I need to get babashka error output fixed over nREPL 😅 if you notice the errors are devoid of stack etc at the moment it's because bb doesn't give you any extra info over nREPL. Best short term solution is to evaluate *e
which does contains the full details.
I'll try it out more over the next few days, when working on my regular nrepl clj clojure projects 🙂
You can also configure it to open a regular nREPL or run a script etc instead of bb 👀 it's basically auto jack-in, you'd probably want to configure that on a per directory basis though.
Is it possible to run the b test in this case with some key combination? <leader>tc only runs "a", which always reports "success":
(t/deftest a
(t/deftest b
(t/is (= 0 1))))
Oh I didn't know that was possible! The current implementation hunts up to the root form for the test under the cursor. Maybe another mapping can be added that will do the current form, but that requires your cursor to be on the deftest b
section, not a form below that.
So given that caveat, do you think that'd do the trick for you?
Hmm are you sure nested deftests make sense? Like you should never use a def below the top level of the namespace, and I thought that rule applied to deftest too? Are you sure you're not thinking of
(t/deftest foo
(t/testing "something else" ...))
different use cases, nested deftests are for tests that share context, t/testing
is for grouping asserts, see https://clojure.github.io/clojure/clojure.test-api.html
It does seem strange to me, like running b
should run everything in a
up to b
.. I'm thinking about forbidding nesting of tests in my current project instead
yeah, it doesn't seen necessary... or maybe it doesn't even work with the cognitect test runner? I don't know
I see the difference now, the subtests are executed in the supertest, not defined. My bad
AFAIU you should be able to nest tests, see the docs here: https://clojure.github.io/clojure/clojure.test-api.html
Greetings! Extremely noob question here, thanks for even bothering to read it. I’m playing around with conjure and stumbling over namespaces. I’ve been starting nREPL like
clj -m nrepl.cmdline \
--middleware "[cider.nrepl/cider-middleware]" \
--interactive
in my project root. Then I go edit ./src/foo.clj
which begins with (ns foo)
.
When I make some functions with defn
and attempt to call them , eg
(defn can-mirror? [part]
(clojure.string/starts-with? (:name part) "left-"))
(can-mirror? {:name "left-foot"})
conjure tells me it can’t find can-mirror?
in this namespace…. if I require '[foo]
into the user
namespace in my running repl, everything becomes happy… but I feel like there is something obvious about this that I am just missing. How to change the repl namespace from within neovim, I suppose, is the succinct thing to ask.
And then I see that foo
is probably a malformed namespace. This has been another episode of Extreme Public Rubber Ducking.