Fork me on GitHub

is cursive not supposed to suggest auto completion for required namespaces? Its working in the repl but not in the editor. Is this expected or am I doing something wrong?


(ns feedagg.core (:require [feedparser-clj.core :as fp]) (:gen-class)) (fp/)


I expect suggestion after the forward slash in the code abive


I realized this is because the lib I am using does not include source. Is there a Cursive option to pull source? If not, whats the best way to attach the source? (assuming I have it)


I dont see the lib under 'External Libraries'. Even though its declared as a dependency in my project.clj


@cfleming: do you have any suggestions for attaching sources?


@moizsj: Did you refresh the leiningen project? leiningen automatically pulls the source


@sveri: I just did an "invalidate cache and restart". Everything looks ok now. The lib appears in "External Libraries" and auto complete works too


@sveri whats the right way to do this?


Depends on what is broken


Theoretically it should be enough to press CTRL+Shift+A, search for "refresh leiningen project" and execute this.


say I add a new dep to my project.clj, what should i do to make sure its picked up by cursive?


Sometimes however things break for cursive / intellij, this is when I do a "invalidate and restart" too


After adding a new lib to project.clj see my first suggestion. It works 99% of the time simple_smile


@sveri: thanks, I'll try it next time I add a dep.


If you have REPl running already you will have to restart that one too after adding a library to project.clj


@jeremys: sorry, was away on business/family stuff so didn't see your message until now regarding lein profiles and figwheel. I tried something similar and not happy with it (hence my mention of figwheel.edn) but hey it works. It's either that for me or connecting via remote nrepl, but that's marked as to be depr, not to mention the usual "meh" with remote connections.


Stupid question to anyone - is there is a simple way to cntrl-c in a cursive repl (using run nrepl with lein) with intellij? For example when you've screwed up doing something with core.async and you're blocking your repl. I felt like I did this when I was using 14 but was using different keybindings. I upgraded to 15 and switched to emacs key bindings and can't remember where/if this option ever existed in a cursive repl. Using slime with emacs, I could cntrl-c twice. Works no problem on the same code from nrepl/emacs, and obviously restarting the repl works, but the point is to avoid that.


I tried binding interrupt, but that didn't work. FYI, I know you can just use the toolbar, but I'm looking for the keybinding.


@moizsj: Does the lib in question provide a source artifact?


@sveri: Actually, lein doesn’t allow pulling source artifacts at all. Cursive does, but it requires some black magic and is really only designed for Java deps.


You don’t tend to notice this since 99% of Clojure deps are distributed as source.


@hugesandwich: Ugh, sorry, it looks like interrupt can’t be bound, it’s hard coded to the toolbar. I’ll separate that out so it can have a key bound do it.