Fork me on GitHub
#cursive
<
2015-11-08
>
lfn300:11:42

Is there a way of getting cursive to treat with def* (e.g. om’s defui) forms like def/defn forms in terms of formatting and var declaration?

cfleming00:11:13

@lfn3: Not right now, sorry, but I’m going to add that soon, for simple cases at least.

cfleming00:11:31

I’m also going to add explicit support for Om Next ASAP

lfn300:11:10

Ok. Cool. That’s one of the only things that bugs me about cursive, is the occasional formatter fighting I have to do.

cfleming00:11:43

Yeah, that and the resolution can be annoying depending on the libraries you’re using.

lfn300:11:57

Agreed. Is this: https://github.com/cursiveclojure/cursive/issues/147 the issue I should be paying attention to re this?

cfleming00:11:18

Yeah, that’s the best catch-all issue for this.

cfleming00:11:57

Basically I’m planning to allow you to say “these forms act like def or let"

lfn300:11:13

Yeah that sounds good to me. On a per project basis or globally or…?

cfleming00:11:06

Globally, I think. That config will be the same for those forms in all projects I think, right?

lfn300:11:04

Yeah. So long as the names are fully qualified to an upstream jar then you shouldn’t ever see stuff clashing. I presume that’s possible, of course.

cfleming00:11:22

Yeah, everything in Cursive is keyed off the FQN

lfn300:11:27

If it’s a global setting it would be really easy to provide a big shared list of these.

lfn300:11:06

Or even for individual projects to supply the bits they have.

cfleming00:11:57

Right. Cursive actually sends back some anonymous usage stats if you haven’t turned that off (basically Cursive version, IntelliJ version and OS). I’m planning to send these lists back as part of this, so I can prioritise which support needs adding based on actual usage, plus I can ship a combined list with Cursive.

lfn300:11:37

I’ll let you get back to it, but thanks.

cfleming00:11:22

No worries. I’m busy right now getting ready for the conj, but I’d like to do this right after that.

cfleming00:11:33

So within a couple of weeks, hopefully.

lfn300:11:15

Cool. If you need anyone to dogfood it for you, I’m happy to take a swing at it. I spend most of my time in a codebase that features lots of custom def macros

cfleming00:11:50

Thanks, sounds good. So are these mostly (defwhatever <a symbol> …), or are there more complex things? Do they often allow docstrings, for example?

lfn300:11:44

There are more complex things, yeah.

lfn300:11:13

One of them takes a vector as an arg prior to the symbol it defines.

cfleming00:11:00

Ok, I won’t be able to handle that with this proposed change, that will require the extension API. I guess this is an in-house macro, not from a public project?

lfn300:11:24

Yeah, in house.

lfn300:11:44

Would your planned solution use the symbol immediately following the function as the name?

cfleming00:11:53

Right, and potentially a string after it as a docstring.

cfleming01:11:05

The internal API allows you to do pretty much anything, but I still haven’t open sourced that, too busy unfortunately.

lfn301:11:19

Understandable. The volume of github issues alone seems kinda staggering for one person to deal with.

lfn301:11:31

Let alone actually writing code.

cfleming01:11:04

Yeah. Currently at least I have more closed than open, so I’m winning, I guess simple_smile

lfn301:11:57

Any day where you manage to actually do what you planned is a win imo.

lfn301:11:30

Maybe that’s just because of my love-hate relationship with yak shaving though.

cfleming01:11:59

Everyone loves a good shave.

lfn301:11:10

Even the yak?

cfleming01:11:35

I hadn’t considered that.