atom-editor

Using the Atom editor with Clojure(Script) - tips, questions, plugins
orestis 2020-07-01T08:31:34.038500Z

In my quest of an editor, I’m now evaluating Atom. I’ve used Vim, Emacs, VSCode in the past 🙂 Any suggested packages for Clojure dev? I’ve installed lisp-paredit, chlorine, linter-kondo… what else are people using?

seancorfield 2020-07-01T16:30:58.041300Z

I like parinfer as well as lisp-paredit. Parinfer takes some getting used to, and I've seen some weirdness when pasting code (you have to switch from smart to paren mode, paste, and then switch back), but I really like the simplicity of paren-grouping following indentation structure. Here's the full list of stuff I have in my ~/.atom/packages folder:

README.md		chlorine		linter-kondo
advanced-open-file	git-plus		linter-ui-default
atom-clock		intentions		lisp-paredit
autocomplete-cfml	language-cfml		parinfer
bracket-colorizer	linter
busy-signal		linter-joker

seancorfield 2020-07-01T16:31:26.041900Z

(ignore the CFML stuff -- I still occasionally have to edit some legacy ColdFusion code!)

seancorfield 2020-07-01T16:31:47.042600Z

I guess I could remove Joker since I switched to clj-kondo.

seancorfield 2020-07-01T16:32:42.043200Z

Also, I use Cognitect's REBL side-by-side with Atom all day long and have specific code and key bindings set up for that https://github.com/seancorfield/atom-chlorine-setup

👍 1
orestis 2020-07-01T16:55:06.047700Z

I’m so used to a nicer auto-indenting/auto-formatting story. Emacs and Calva have some nice accordances like collapsing trailing parens, column-aligning let bindings... other than running the file through clj-fmt, is there anything else?

seancorfield 2020-07-01T16:59:35.049600Z

parinfer will do some amount of auto-formatting when opening a file, including collapsing trailing parens. The let bindings thing is something I prefer manual control over (and don't column-align all bindings anyway -- it depends on how it looks, how long the symbols are, how long the expressions are).

seancorfield 2020-07-01T17:00:42.050800Z

I'm more likely to "tuck" a binding form if either the symbol or destructuring is long or the form itself is wide:

(let [[something another-thing]
      (this is some complex form)]
  ...)

orestis 2020-07-01T18:27:45.052400Z

I like to align let bindings on a case by case basis. I probably wouldn’t want a formatter to align them no matter what, but having a command to automate it would be nice.