Fork me on GitHub
#cursive
<
2017-02-27
>
cfleming19:02:25

@isak Oh, good find, thanks - that looks great

cfleming19:02:45

I’ll check the TypeScript ones, there’s potential I might be able to use the types if present. Looks like Closure uses jsdoc types though.

cfleming19:02:34

@dm3 Sure - so yes, Cursive understands Potemkin. There’s a hack you can use if the import-vars there works like Potemkin’s.

cfleming19:02:51

Cursive contains functionality to treat some forms in the same way as some existing form: https://cursive-ide.com/userguide/macros.html

cfleming19:02:19

Currently that has a hard-coded list of forms that you can resolve as, but under the hood it can be anything.

cfleming19:02:35

Which I’ll probably expose shortly.

dm319:02:51

hm, I’m still confused - do I have to do anything special to make Cursive recognize imported vars the same way it does the original ones?

cfleming19:02:04

In the meantime, you can hack your resolve config file as discovered by @favila here: https://github.com/cursive-ide/cursive/issues/1440#issuecomment-232776904

dm319:02:56

yeah, I don’t use Cursive myself - it’s people complaining about my library

cfleming19:02:29

If you modify the config file to treat clojure.java-time/import-vars (or whatever the var is) as potemkin/import-vars (or whatever that one is, I don’t have the code right here)...

dm319:02:51

so potemkin/import-vars is hardcoded somewhere in Cursive, is that right?

cfleming19:02:06

In an extensible way, but yes

cfleming19:02:04

Could you create a new issue for that so it’s not mixed with the intern issue, and put the full clojure.java-time var in there, and I’ll add that?

cfleming19:02:25

@dm3 It’s just a copy of the Potemkin one, right?

cfleming19:02:36

Internally this is all based around an extension api, which I will open up at some point - then you’d just be able to make a fairly trivial PR to a public repo, and everyone would get that support.

cfleming19:02:43

Right now, I have to add it.

dm319:02:49

yeah, I see how that would work 🙂

dm319:02:54

ok, I’ll create the issue for now