Auto :require

13 views
Skip to first unread message

Michael Robin

unread,
Jul 30, 2022, 7:15:48 PM7/30/22
to Cursive
Hello!  Old-time (and just old) lisp programmer, relative newbie to Cursive/Clojure...

Is the automagic insertion of :requires supposed to work with user-defined namespaces? 
I can get it to work with the clojure.* libs (as shown in the user guide) but I expected it to work for the  namespaces in my own project as well.

thanks

William la Forge

unread,
Jul 30, 2022, 7:54:06 PM7/30/22
to cur...@googlegroups.com
require works great. and automagic insertion too. Though I think it requires a use in another namespace to kickstart it.

(ns spark.core
(:require [spark.kws :as kws])
(:gen-class))

--
You received this message because you are subscribed to the Google Groups "Cursive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cursive+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cursive/8fff31ce-76a6-4fe3-9ba4-c77837358de3n%40googlegroups.com.

Colin Fleming

unread,
Aug 1, 2022, 2:11:14 AM8/1/22
to Cursive Group
That's right, the auto-add will work for all namespaces (including user defined ones), but it does need one example to work from so that Cursive knows which aliases you like to use for which namespaces. There are some open issues around optimising the action of adding the first require, but currently that's a manual step.
Reply all
Reply to author
Forward
0 new messages