This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-28
Channels
- # bangalore-clj (1)
- # beginners (67)
- # braveandtrue (179)
- # cider (28)
- # cljdoc (1)
- # clojure (132)
- # clojure-conj (3)
- # clojure-dev (1)
- # clojure-finland (6)
- # clojure-nl (2)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (62)
- # clojurescript (90)
- # clojutre (5)
- # component (2)
- # cursive (30)
- # data-science (1)
- # datomic (42)
- # duct (9)
- # emacs (1)
- # figwheel-main (158)
- # fulcro (57)
- # funcool (3)
- # hoplon (1)
- # jobs (17)
- # mount (38)
- # off-topic (15)
- # re-frame (53)
- # remote-jobs (2)
- # schema (11)
- # shadow-cljs (299)
- # spacemacs (25)
- # specter (2)
- # tools-deps (54)
- # vim (11)
- # yada (6)
i just created a new deps project by
mkdir xxx
cd xxx
echo '{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}}' > deps.edn
idea .
and then just press next next next.
my Preferences / Build Tools / Maven / Repositories list is empty.
doesn't it supposed to have maven and clojars by default?
i would like to use the package and version autocompletion in my deps.edn
.Not sure if this is a bug per se — but these little hints don’t seem to appear for macros, only regular functions
@cfleming on that, cljs also doesn't auto-complete macros, but once you type it it's recognized
the same issue kind applies to auto-import, doesn't work when pointing to macros, but work for fns
@U066U8JQJ Hmm, that’s definitely a bug. I’m pretty busy right now but when I get a chance I’ll look at that.
@tap @suomi.esko I don’t think that’s possible - I don’t think I can override the class navigation. What you can do is rebind the actions, which I’ve done - I have Cmd-O goto Class, Shift-Cmd-O goto ns, Ctrl-Shift-O goto file.
I tried it on another machine and the default repo list was not present after importing the fresh project.
(by idea .
i meant Import Project
from IntelliJ's opening screen and double clicking the deps.edn
.
One question - do you have the Clojure CLI installed on those machines? The repos come from the system deps.edn, perhaps Cursive can’t find it for some reason?
I do have a user-local installation, yes, so even outside of my project's nix-shell, i have clj
on the $PATH
.
$ clj -Sdescribe
{:version "1.9.0.391"
:config-files ["/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn" "/Users/onetom/.clojure/deps.edn" "deps.edn" ]
:install-dir "/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix"
:config-dir "/Users/onetom/.clojure"
:cache-dir ".cpcache"
:force false
:repro false
:resolve-aliases ""
:classpath-aliases ""
:jvm-aliases ""
:main-aliases ""
:all-aliases ""}
and you can see that the default repos are there too in the system deps.edn
:
$ cat /nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn
{
:paths ["src"]
:deps {
org.clojure/clojure {:mvn/version "1.9.0"}
}
:aliases {
:deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.442"}}}
:test {:extra-paths ["test"]}
}
:mvn/repos {
"central" {:url " "}
"clojars" {:url " "}
}
}
it seems correctly configured for me:
$ /nix/store/qxzhmfmv8k248m869icyfb2xnj2lc63b-clojure-1.9.0.391/bin/clojure -Sdescribe
{:version "1.9.0.391"
:config-files ["/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix/deps.edn" "/Users/onetom/.clojure/deps.edn" "deps.edn" ]
:install-dir "/nix/store/m0qiv8040pxkybmcp7vhzl0q8ia6h5l3-clojure-1.9.0.391-prefix"
:config-dir "/Users/onetom/.clojure"
:cache-dir ".cpcache"
:force false
:repro false
:resolve-aliases ""
:classpath-aliases ""
:jvm-aliases ""
:main-aliases ""
:all-aliases ""}
but clojure cli itself and its default config are in different directories, so you shouldn't derive the location of the deps.edn
from the path of clojure
or clj
, but from the :install-dir
in the output of clojure -Sdescribe
.
Hmm, I wonder what’s happening. I didn’t get a chance to try this the other day - I’ll try to look at this early next week.
my only complaint about that is that it checks after every keystroke, so when there’s an error (according to parinfer) it slows down the IDE a lot
is there a “close everything” action/key? would be super convenient when things get messed up
@lee.justin.m The problem with that is where to put the closers - it’s a surprisingly hard problem.
It’s basically what parinfer does, and parinfer uses indentation to figure out where the closing ones should go.
@cfleming i mean just close out all the way to the top level. it would only make sense at the end of a top-level form.
parinfer still gets badly confused on cut and paste sometimes, and I can generally fix things easily enough, but it is typically very annoying to fix the final close outs which can be something complicated like }])}]]))
@lee.justin.m Right, but what you’re proposing would have the same problem or worse, since parinfer at least does a reasonable job by using indentation.