Fork me on GitHub
#calva
<
2020-01-28
>
otwieracz08:01:12

Any ideas why does calfa-fmt.formatCurrentForm fails with:

otwieracz08:01:22

(defn test
  [foo]
{:pre [(s/valid? ::foo foo)]}
  foo)

pez08:01:44

In what way does it fail? Where is your cursor when you run the command?

otwieracz08:01:58

Wherever I try, basically..

otwieracz08:01:15

Anywhere inside this form it fails.

otwieracz08:01:31

{:pre ..} causes the problem.

pez08:01:50

Fails, in that it leaves the map unindented? (Like you posted it)

otwieracz08:01:22

No, error is thrown:

pez08:01:44

Not really. I don't get that error when I try it. And it gets formatted. Hmm... See if you have any more error info in the development console (Toggle Developer Tools in the Help menu).

otwieracz08:01:24

console.ts:137 [Extension Host] Error in _formatIndex`: Namespaced keywords not supported !`

otwieracz08:01:14

Changing ::foo to :foo (although it's not a solution obviously) brings back formatting.

pez08:01:30

However, I thought that didn't affect the case you have there.

pez08:01:47

(And it doesn't for me, so this is pretty confusing...)

borkdude09:01:43

@pez Maybe give rewrite-cljc by @leea try: https://github.com/lread/rewrite-cljc-playground It's a drop-in replacement. I've been using it in carve and so far I've seen no problems.

borkdude09:01:07

I'm hoping this will be the maintained successor to all rewrite-clj forks out there

pez09:01:11

Cool. Wasn't aware about the preview.

lread12:01:15

Hiya! I shall be getting back to rewrite-cljc soon!

🔥 4
borkdude12:01:49

@lee The future of clj(c) tooling depends on you now 😄

😬 4
lread15:01:18

Yes @pez, it was you who inspired me! 🙂

borkdude15:01:23

Oh wow, thanks for inspiring lread pez!

lread17:01:13

And @borkdude has certainly motivated me! simple_smile

metal 4