parinfer

henrik 2020-09-17T07:56:26.032100Z

Looking att Nova this morning (out of curiosity, obviously a no-go for Clojure atm). What hooks does Parinfer need to do its magic? Currently reading the extensions API: https://docs.nova.app/api-reference/text-editor/

mauricio.szabo 2020-09-17T13:52:19.033600Z

@henrik I've implemented a bunch of parinfer tools. I found out that using the "parinfer-rust" implementation is easier than others. The code for Atom is here: https://github.com/mauricioszabo/atom-parinfer-plus. Is quite simple, really

👏 1
mauricio.szabo 2020-09-17T13:54:21.034800Z

You'll just have to listen to changes on the text editor, invoke the parinfer command, then replace the results. The parameters for parinfer-rust are these: https://github.com/mauricioszabo/atom-parinfer-plus/blob/master/src/parinfer_plus/core.cljs#L26-L30.

mauricio.szabo 2020-09-17T13:54:37.035200Z

(also, you'll send the current text on the editor as the first parameter)