editors

Discussion about all editors used for Clojure/ClojureScript
Shantanu Kumar 2019-02-22T03:46:09.002Z

Has anybody else felt Atom editor screws up parens by "auto-fixing" them during cut-paste and indentation? /cc @seancorfield

Shantanu Kumar 2019-02-22T03:46:21.002400Z

I've followed https://medium.com/@jacekschae/slick-clojure-editor-setup-with-atom-a3c1b528b722 to setup Atom.

Shantanu Kumar 2019-02-22T03:46:46.002900Z

^^ /cc @jacek.schae

seancorfield 2019-02-22T06:26:07.003700Z

@kumarshantanu The short answer is "it depends". The long answer is "it works nearly every time but..."...

seancorfield 2019-02-22T06:28:49.005100Z

If you copy and paste a single form across multiple lines, that can go wrong. If you copy and paste entire blocks of lines and let parinfer sort things out, it works. I have had paredit slurp break sometimes...

Shantanu Kumar 2019-02-22T06:32:06.005800Z

@seancorfield Is there a way to disable this behavior? Perhaps I should try disabling Parinfer and see.

Shantanu Kumar 2019-02-22T06:33:43.007300Z

As of now, even pressing Enter at the end of an inner form doesn't work - it doesn't move rest of the code to the next line where I could add something.

Shantanu Kumar 2019-02-22T06:35:46.008600Z

And one more question: How can I reindent some code in Atom? (Like pressing Tab on any line corrects the indentation in Emacs/Clojure-mode and Eclipse/CCW.)

seancorfield 2019-02-22T06:43:33.008900Z

ctrl-alt-i as I recall.

seancorfield 2019-02-22T06:43:50.009200Z

(i.e., alt-tab)

Shantanu Kumar 2019-02-22T06:48:03.009700Z

Thanks, @seancorfield ctrl-alt-i works!

pez 2019-02-22T08:17:34.014Z

@kumarshantanu : > As of now, even pressing Enter at the end of an inner form doesn't work - it doesn't move rest of the code to the next line where I could add something. This takes a little while to get used to. If you start typing Parinfer will move that paren-trail down. (I have asked in #parinfer about if this behaviour could be altered, because even though I am used to it is still doesn't really play well with me. This is why Infer parens is an explicit command in Calva, and not something that happens as you type.)

Shantanu Kumar 2019-02-22T08:59:18.018400Z

@pez Thanks for chipping in. I'll try vscode with calva again - found no guide recently to set up vscode with bells and whistles like the one I linked above for Atom.

pez 2019-02-22T09:01:44.020200Z

@kumarshantanu: It's extra ironic, because the guy who wrote that guide wanted to write a guide for Calva too, until he realized that it didn't infer parens as-you-type, at which point he thought Calva was so broken that he didn't want to write the guide. 😃

Shantanu Kumar 2019-02-22T09:03:34.021400Z

Haha, I have meanwhile disabled Parinfer on Atom and I like it better. I tried Calva long time back and I liked it then.

pez 2019-02-22T09:06:45.024600Z

Full disclosure: Calva lacks some of the really cool stuff that ProtoREPL and Chlorine have. We're slowly closing the gaps, but anyway. However, there is little need for a guide as that one. Calva packs most things you need. I only add Clojure Warrior to the mix. (Which we might also incorporate into Calva down the road.)

pez 2019-02-22T09:08:59.027300Z

The two big basic things lacking from Calva right now is a decent REPL window and jack-in functionality. Both will be fixed before Mars ends, I am hoping. Please feel invited to join #calva-dev for discussing Calva stuff further.

Shantanu Kumar 2019-02-22T09:10:19.028400Z

Actually, what threw me off was I found three packages Calva (1.3.63), Calva Clojure Formatter (0.0.38) and Calva Paredit (0.1.22) when I searched for Calva on vscode - I didn't know which ones to choose etc.

pez 2019-02-22T09:14:53.031100Z

Yeah, majorly confusing! We're fixing that too with the first release sporting that REPL window. Then there will only be Calva. (FYI, you only need to install Calva.)

1
pez 2019-02-22T09:20:33.032800Z

(The reason I allowed that confusion was that I wanted people to have the choice to use only the formatter and/or paredit, but something else for REPL stuff, but I have been convinced that now we instead will make Calva so awesome that no-one will want to use anything else. 😃 )

Shantanu Kumar 2019-02-22T09:24:10.033100Z

Sounds good to me. 🙂