chlorine-clover

About Chlorine for Atom and Clover for VS Code: https://atom.io/packages/chlorine and https://marketplace.visualstudio.com/items?itemName=mauricioszabo.clover
sparkofreason 2020-10-27T15:01:11.115500Z

More of an atom question, but hoping perhaps it's related to the typical clojure/chlorine setup in atom. When editing non-clojure files, like JSON, the auto-indent behavior inside of any brackets is broken, defaulting to indent to the space after the previous opening bracket when inserting a newline. I've tried toggling the obvious things like Auto Indent in the editor and language-specific settings, nothing seems to have an effect. Has anybody else seen this?

seancorfield 2020-10-27T16:11:53.116800Z

@dave.dixon Sounds like your default binding for enter is to lisp-paredit: newline (which I have in my keymap to deal with other quirks I don't like). shift-enter should give you a plain newline I believe.

sparkofreason 2020-10-27T16:15:10.116900Z

Thanks, that was it. I'll see if I can scope that binding to Clojure files.

sparkofreason 2020-10-27T16:20:56.117100Z

Separating the newline definition into its own block like this seems to work. Curious if there's some reason you don't do that (i.e., where is it going to bite me?)

'atom-text-editor[data-grammar="clojure"]':
  # paredit:
  'enter':          'lisp-paredit:newline'

seancorfield 2020-10-27T16:53:33.117300Z

I can't remember the problems I ran into -- it was a long time ago -- but I should probably do that too and see if I bump into anything odd. I always knew it was a bad idea to blank route enter to paredit 🙂

1
seancorfield 2020-10-27T17:11:36.117600Z

So far, so good. Will ping back here with anything I run into...

seancorfield 2020-10-27T17:28:09.118100Z

Yeah, it's a very flexible system and also easy to shoot yourself in the foot with it 😐

2020-10-27T18:42:47.121Z

Wise choice. A common annoyance is shortcuts that assume a certain regional keyboard - a bunch of standard keys on US keyboards require special switches on many European keyboards. Ugh.

sparkofreason 2020-10-27T18:59:50.121200Z

@mauricio.szabo Yes, makes sense.

sparkofreason 2020-10-27T19:02:55.123700Z

One thing I've noticed recently is that if I interact with the inline results from evaluating forms, the editor pane ignores keyboard input, or maybe redirects it so you can interact with the output (ENTER seems to open/close maps, for example). That's probably by design, but is there some command to escape back to the editor? I can click on the text, but wondering if there's some key-binding I could use/make.

mauricio.szabo 2020-10-27T19:19:02.124900Z

Well, it's not really by design... it's because the focus gets redirected to the inline result. I don't know if there's a workaround, to be honest... but it also bugs me 😞

seancorfield 2020-10-27T19:54:16.126700Z

It's partly why I like working with Reveal alongside Atom/Chlorine. I can alt-tab to Reveal when I want to interact with results and then alt-tab back to the editor. I almost never interact with the inline results (except, occasionally, to click into exceptions/stacktraces to expand them... and I'm thinking of changing my eval shortcuts so those get caught and tap>'d into Reveal...

seancorfield 2020-10-27T19:54:48.127400Z

(I can't catch all exceptions that way -- e.g., load-file failures -- but it would handle most evaluations I do)