Fork me on GitHub
#cursive
<
2016-01-29
>
cfleming00:01:53

@misha: Right, Figwheel does have an nREPL option but you have to configure it, and then start Figwheel and start the REPL in Cursive. IMO the clojure.main one is the best experience right now.

cfleming00:01:04

I’m going to be making that a first-class citizen soon.

cfleming02:01:08

@danielcompton: You can even create your own if you want to: Settings-&gt;Editor-&gt;Live Templates

cfleming02:01:29

Check the ones there for examples of how they work.

shaun-mahood03:01:13

Oh that looks really useful - going to have to play with some live templates tomorrow,

cfleming08:01:50

@james: So thinking about it, there actually might be a workaround for the inline evaluation thing.

cfleming08:01:47

It’ll probably be obvious that the result spans more than one line if it’s a map or whatever. I can show a shortened preview version on a single line, but what I can’t do easily is make that clickable or expandable.

cfleming08:01:31

However what I can probably do is put a marker in the gutter, and also add a keyboard action for “Show full result for current line”. So you could pop it up by using the key or by clicking in the gutter.

cfleming08:01:41

It’s a little clunky, but it’s better than nothing.

cfleming08:01:03

It could possibly even pop up automatically if the result is multi-line, and when the popup is hidden you’d just see the single line again.

doddenino08:01:24

Hi everyone!

james08:01:03

@cfleming: That sounds like a great start.

james09:01:21

When (if) JetBrains add support for better in-editor overlays, then hopefully it wouldn’t be a lot of work for you to move over to using the new approach.

cfleming09:01:52

@james: Right, that’s what I’m thinking.

cfleming09:01:05

I’ll investigate to see how I can get it looking.

james09:01:19

@cfleming: I'm really looking forward to trying out what you come up with.

cfleming09:01:46

@james: Cool, I have some things queued up but I’ll try to get to it soon, it’s a popular request.

imre09:01:19

@cfleming: is there a place where you can set a keyboard shortcut to send a specific command to the repl no matter where in the source you are?

cfleming09:01:14

@imre: This is the second thing on my new-functionality list after parinfer.

cfleming09:01:25

So hopefully within a couple of weeks.

imre09:01:07

sounds great

imre09:01:23

I found the run tests... commands very useful lately

cfleming09:01:36

Great, I really like how that works too.

cfleming09:01:46

Are you using the visual diff for data structure results?

imre09:01:50

but couldn't find one that runs all the tests from all the ns

cfleming09:01:54

I find that invaluable.

imre09:01:01

yeah it's very handy

cfleming09:01:14

There isn’t one, yet - currently I just delegate that to lein or whatever you’re using.

cfleming09:01:22

But I’m planning an IntelliJ-style test runner.

imre09:01:33

great stuff

imre09:01:14

if issue 85 is done, one could define a custom repl command to do it in the meantime

cfleming09:01:26

Yes, for sure.

cfleming09:01:45

But it’s nice having little green icons and bars simple_smile

imre09:01:47

so far I'm having a wonderful experience with Cursive, been using it since early 2014, some excellent progress has been made

cfleming09:01:23

Great, I’m glad you’re enjoying it! I’m hoping to file off a lot of rough edges this year, and add some great new stuff too.

cfleming09:01:36

Especially for cljs, which needs a little love.

imre09:01:42

yeah, the whole cljs ecosystem has a long way to go

imre09:01:50

to catch up

cfleming09:01:11

It’s improving rapidly, though, and I think with some tooling in Cursive it’ll come pretty close.

imre09:01:19

hopefully!

cfleming09:01:21

Most of the pieces are there, they just need some polish.

imre09:01:13

the shite I had to go through to get proper unit testing was not pleasant

imre09:01:23

(not talking about cursive ehre)

cfleming09:01:46

Yeah, that’s one of the things I really want to add - equivalent functionality to what Cursive offers for clojure.test

imre09:01:03

I think the deeper problem right now is that there's no simple, out-of-the-box solution in cljs for lein test

cfleming09:01:31

Right, doo seems to be the state of the art, but I’ve heard it’s finicky - I’ve never tried it myself

imre09:01:04

the only thing is doo doesn't support windows at all

imre09:01:10

and although it sounds weird to develop clojure/script on windows, some people are stuck with it

imre09:01:27

I'll stop ranting simple_smile

imre09:01:27

FYI I ended up using karma to run my cljs unit tests and I really like the karma vision

doddenino09:01:53

Hey, not very in-topic, but is it normal for intellij's search everywhere (shift-shift) to give only exact matches?

imre09:01:06

of being able to configure at runtime what engine and reporter to use

cfleming09:01:39

Right, cljs tooling is complicated by the number of runtimes that have to be supported

cfleming09:01:20

@doddenino: I’m actually not sure, I don’t use it much myself. More relevant to Cursive is that many Clojure elements aren’t found there (like namespaces)

doddenino10:01:04

@cfleming I see, I'll check online later on as this is pretty much a show stopper for me 😞

Kamuela18:01:09

What does it seem like the default indenting structure for Cursive/IntelliJ is? I’m noticing something like 8 spaces

Kamuela18:01:04

Also, what’d be the equivalent of terminal “lein ring server-headless"

misha19:01:22

@kamuela: try to set Preferences -> Editor -> Code Style -> General tab -> "Default to Only indent" checkbox on

Kamuela19:01:27

@misha: thanks, did the trick simple_smile

misha19:01:55

without it (and maybe something else) indentation length depends on context, e.g. macros name:

(rum.core/defc some-component []
               [:h1 "yo"])
vs.:
(rum.core/defc some-component []
  [:h1 "yo"])

Kamuela23:01:02

I noticed that cursive gets really angry if you try to remove parentheses. Am I doing it right by just copying and pasting out full forms?

cfleming23:01:46

@kamuela: It’s probably structural editing messing with you, see https://cursive-ide.com/userguide/paredit.html