Fork me on GitHub
#cursive
<
2017-04-17
>
Oliver George01:04:38

I think I've worked out the killer clojure-spec feature for Cursive... hiding them. I find I want specs in my code because it picks up a lot of bad function calls and nil puns. Problem is that adding specs to every function is verbose and adds friction as I refactor. What I want is specs which are sprinkled on (e.g. right click a fn arg and specify a pred) and only see the spec by hovering the mouse. I'd never open the accompanying spec file.

Oliver George01:04:05

Ya, know. Just when you have a quiet moment Colin. #loveyourwork

Oliver George01:04:44

(equally, hiding pre/post and asserts would reduce clutter)

cfleming03:04:24

@olivergeorge So that’s actually pretty easy using code folding. Could you file an issue for that one and I’ll look into it? If you have a simple example of the sort of thing you’d like to hide that would be great too.

Oliver George06:04:35

Would you like something specific to the spec side of things? I think covers the point about pre/post/asserts https://github.com/cursive-ide/cursive/issues/1406

cfleming07:04:11

@olivergeorge Sorry, I had forgotten about that one. If you have some simple spec examples that would be good too - do you just want s/fdef collapsed by default?

cfleming07:04:24

Feel free to use that same issue, no need for a new one.

Oliver George09:04:58

No worries. I'll have a think about it.

tianshu12:04:39

@cfleming Is it possible to disable resolution and syntax check for one symbol?

tianshu15:04:04

and I also think auto-completion should be enable in .edn file, maybe

danielcompton19:04:22

Is there a way to change the stack trace repl printer? My stack traces are typically ~100 lines long, so I always need to scroll back up to the top to see the problem

cfleming22:04:19

@danielcompton If you have clj-stacktrace or aviso/pretty loaded in your REPL, they’ll be used.

cfleming22:04:30

Are your stack traces not being folded?

danielcompton22:04:54

No, but I'm using a remote REPL into a boot repl

danielcompton22:04:02

that might have something to do with it

danielcompton22:04:10

I thought boot automatically included aviso/pretty

cfleming22:04:44

I’m not sure - can you create a gist of a problematic exception?

cfleming22:04:56

This is clj or cljs?

danielcompton22:04:25

I'll try put something together

cfleming22:04:29

@danielcompton Note that pretty has to actually be required in your app to work, i.e. the namespace has to be loaded. Is it possible boot bundles it but doesn’t load it unless you ask it to?

danielcompton22:04:52

hmm, perhaps. I've added it myself to my deps and required it in my dev namespace and it seems to be working now

cfleming22:04:17

Ok, cool. I’m still interested in an example of a stacktrace that isn’t folding correctly, if you have one.

cfleming23:04:07

@doglooksgood No, it’s not - how would you like that to work?