Fork me on GitHub
#calva
<
2018-09-30
>
jacekschae10: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?

jacekschae10: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

jacekschae10: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…

jacekschae14: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.

jacekschae14: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

jacekschae14: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?

jacekschae14: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.

jacekschae14:09:52

:thinking_face: 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?

jacekschae14:09:57

i have calva paredit and calva installed

jacekschae14:09:15

calva formatter too

pez14:09:40

Calva Formatter is bundled with Calva. 😃

jacekschae14: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.

jacekschae14:09:06

i really appreciate you work around this

jacekschae14:09:36

love VS Code and would to switch

jacekschae14:09:19

and wanted to do the same for vscode and calva

jacekschae14:09:10

is there any resource that you would recommend for calva?

jacekschae14: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.

jacekschae14:09:18

it's the same thing i use for atom

pez14:09:33

Yeah, I saw that in the article. 😃

jacekschae14: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.

jacekschae14: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.

jacekschae14:09:47

would you have time now?

pez14:09:59

Yes! 😃

jacekschae14: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. 😃

jacekschae15:09:37

Thanks for your time - it did!