This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-05
Channels
- # aws-lambda (1)
- # beginners (294)
- # boot (35)
- # cider (19)
- # cljs-dev (39)
- # cljsrn (7)
- # clojars (48)
- # clojure (266)
- # clojure-android (1)
- # clojure-brasil (1)
- # clojure-france (2)
- # clojure-greece (5)
- # clojure-italy (7)
- # clojure-mexico (1)
- # clojure-russia (24)
- # clojure-spec (10)
- # clojure-uk (31)
- # clojurescript (134)
- # consulting (7)
- # cursive (69)
- # datomic (20)
- # emacs (57)
- # events (2)
- # figwheel (2)
- # hoplon (1)
- # jobs-discuss (19)
- # luminus (33)
- # lumo (18)
- # mount (1)
- # off-topic (32)
- # om (5)
- # onyx (27)
- # pedestal (15)
- # re-frame (12)
- # reagent (28)
- # rum (2)
- # schema (2)
- # spacemacs (9)
- # unrepl (2)
- # untangled (7)
- # vim (5)
- # yada (4)
I get the following error in intelliJ when I try to import a project or add a module from existing source: Can't change/establish root binding of: *ns* with set
. I have tried reinstalling IntelliJ and updating java, but the error still appears. Anybody who have a suggestion to what I can try?
Problem solved: The dobbelt-plings in my lein profiles file were formatted.
@cfleming Personally, in Parinfer mode, I think some enhancement is needed for pasting code. After
(defn hello [x])
| <-- cursor here, paste
I have to indent code manually, or I have to switch to paredit, paste, then switch back.@doglooksgood Yeah, I know 😞. I’m planning to fix that.
The pasting thing is IntelliJ trying to be too clever - it’s not Cursive/parinfer doing it.
If my cursor is located before a close paren, the pasting works fine.
(defn hello [x]
|) <-- this works
no matter in parinfer or pareditOh, right - previewCursorScope holds the parens there when the caret is there, right?
I believe it was because it made editing totally not work in some contexts that are not normal editors, like diff views.
personally I don't use previewCursorScope, In my personal opinion, when pasting, parinfer indent mode should always preserve indentation.
I don't know if there's a hook or some stuff for paste in IntelliJ, that's pretty easy in Emacs though.
I have a problem with the REPL, hopefully an easy one to solve. At work I am forced to use aws-vault for authenticating to aws. That means I need to prepend aws-vault exec profile --
to any command. aws-vault exec profile -- lein repl
works fine. How can I achieve this in Intellij when opening a REPL?
aws-vault exec profile -- idea
works, but I want to be able to use use different aws profiles for different REPLs
@psalaberria002 What does that do? I guess it sets environment variables?
yes, that’s what it does under the hood. But it keeps credentials in a vault.
I don’t think there’s any way to do that with the Cursive REPL, since it invokes lein in a non-standard way.
manually adding the env variables is not an option
Then unfortunately I think your only option is to run lein repl :headless
on the command line, and connect a remote REPL to it.
It’s a little fiddly, https://github.com/cursive-ide/cursive/issues/1039 would make it better.
thank you 😉
The only other option I can think of would be to have an option to execute a command, and then use the env vars set by that command to run the REPL.
I actually don’t even know if Java would allow me to do that (read the env as set by a process I’ve run)
makes sense
I will keep am eye on the issue in github. in the meantime I will have to open another terminal
Is there a built-in way to rename a leiningen project in Cursive? (change all namespaces/folders/references from “project-a” to “mything-b”)
jtth: Have you tried highlighting the project name in project.clj
and clicking shift+F6
?
@U4Q7NLNMC There’s no refactoring support for this, no, sadly.
@cfleming some love for this one please (if priorities permit) https://github.com/cursive-ide/cursive/issues/1439
What's new in Cursive 1.5.0: https://www.deps.co/blog/whats-new-in-cursive-1.5.0/
@danielcompton Thanks for writing that up!
You're welcome 🙂
@mkeathley No problem! Glad it’s helpful.
Ok, is that always in the context of a particular datomic call, or would you want that in general data structures?
Typically you would write Datomic queries like parameterised SQL queries
Structure stays constant, variable values are passed in as :in
Datomic has a query cache, so reusing the structure for the same query helps
Right, but what I mean is, is this always something like (d/whatever '[:find ?e :where [?e :user/name]])
or:
(let [my-query '[:find ?e :where [?e :user/name]]]
(d/do-something my-query))
One means that the functionality can be keyed off the function use, the other means I’d have to look for any vector that looks like a query in any namespace requiring datomic.
probably the latter
I can see queries being dynamically built once
but just highlighting symbols that are equal inside a quoted statement would be a pretty good solution
If you wanted to get really fancy, you could follow the scope through rules as well http://www.learndatalogtoday.org/chapter/8
which would be very cool