Fork me on GitHub
#calva
<
2018-09-30
>
jacek.schae10:09:58

I've been playing around with calva and find it really cool! There are a couple of things that hold me back from switching from Atom setup and was wondering maybe I'm just not aware if this can be also done in calva?

jacek.schae10:09:30

when I edit the code and let's say press the tab button I would like that the whole s-expression moves and not only first line

jacek.schae10:09:34

this is supported by parinfer smart mode, is this also available in calva?

pez12:09:59

It isn't. But should be reasonably simple to implement, unless I am overlooking something. I can give it a shot!

pez13:09:04

@jacek.schae: in what situation would you want to indent the form like that? Calva would reformat it back to conform with community standards…

jacek.schae14:09:24

@pez you mean when I change something and click save it would automatically align everything?

pez14:09:19

It tries to do that today (if that setting is on), but actually it often fails. But when it succeeds, or you use the Format Document command it will align things.

jacek.schae14:09:33

this kind of indentation that i put in the gif I use very often - for example when editing any reagent files and need to move-in or move-out some hiccup forms from nesting

jacek.schae14:09:10

this will automatically also add/remove parens

pez14:09:16

So, you intent a block of code and then put something that encloses it above?

jacek.schae14:09:36

i don't know what is the best way to explain this ...

pez14:09:44

Unfortunately parinfer smart mode is hard to implement in VS Code. There has been work put on it, but I don’t think they have succeeded yet.

pez14:09:27

What I do when working with hiccup (for instance) is that I slurp and barf stuff using Paredit.

jacek.schae14:09:52

🤔 just trying it out. I guess the closest is to highlight everything and then use cmd + { and cmd + }

pez14:09:19

Just trying what out? 😄

pez14:09:20

I don’t think you need to highlight anything for that?

pez14:09:18

I have bound slurping to ctrl+right and barfing to ctrl+left, but that is because I got used to that on emacs (and because cmd+{ does not really work on a Swedish keyboard layout).

pez14:09:54

Are you trying Calva Paredit?

jacek.schae14:09:57

i have calva paredit and calva installed

jacek.schae14:09:15

calva formatter too

pez14:09:40

Calva Formatter is bundled with Calva. 😃

jacek.schae14:09:43

i guess the last one comes with calva

pez14:09:53

Yeah, I moved the formatting out of Calva to let people have the option to use the formatter even if they wanted to use some other REPL extension.

pez14:09:27

In any case. If the #parinfer team, manages to get smart mode to work in VS Code then I will do my best to make Calva compatible with it. Until then I think Paredit is the choice.

jacek.schae14:09:06

i really appreciate you work around this

jacek.schae14:09:36

love VS Code and would to switch

jacek.schae14:09:19

and wanted to do the same for vscode and calva

jacek.schae14:09:10

is there any resource that you would recommend for calva?

jacek.schae14:09:19

I could use this as a base for writing

pez14:09:35

That would be awesome. Though Calva is a long way from matching some of Proto REPL’s magic.

pez14:09:41

I don’t think anyone has written much about using Calva.

pez14:09:10

I like how you have structured that Atom article. It would be a great resource for people to get started with Clojure on VS Code and bridge some of the gaps that exists today.

pez14:09:08

Calva uses Joker for linting, btw.

jacek.schae14:09:18

it's the same thing i use for atom

pez14:09:33

Yeah, I saw that in the article. 😃

jacek.schae14:09:08

do i need to set up something for calva-fmt to kick-in?

pez14:09:14

Someone, somewhere, suggested to try some other linter, the other day. I have it on my todo to check it out.

pez14:09:09

No, Calva format kicks in when Calva kicks in.

jacek.schae14:09:10

would it be too much to ask for a quick hangout session to show me few things?

pez14:09:28

Not at all. I’d love to.

jacek.schae14:09:47

would you have time now?

pez14:09:59

Yes! 😃

jacek.schae14:09:22

what email should i use to send you an invite?

pez14:09:45

or just paste a link here.

pez15:09:46

Thanks for the chat. I hope something made sense. 😃

jacek.schae15:09:37

Thanks for your time - it did!