Fork me on GitHub
#cursive
<
2016-01-18
>
moizsj13:01:09

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?

moizsj13:01:04

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

moizsj13:01:23

I expect suggestion after the forward slash in the code abive

moizsj13:01:55

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)

moizsj13:01:59

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

moizsj13:01:59

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

sveri13:01:51

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

moizsj13:01:00

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

moizsj13:01:19

@sveri whats the right way to do this?

sveri13:01:33

Depends on what is broken

sveri13:01:02

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

moizsj13:01:12

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

sveri13:01:22

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

sveri13:01:58

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

moizsj13:01:28

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

sveri13:01:59

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

hugesandwich18:01:24

@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.

hugesandwich18:01:14

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.

hugesandwich18:01:12

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.

cfleming21:01:33

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

cfleming21:01:55

@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.

cfleming21:01:54

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

cfleming21:01:20

@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.