Fork me on GitHub
#parinfer
<
2020-09-17
>
henrik07:09:26

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.szabo13:09:19

@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

👏 3
mauricio.szabo13:09:21

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.szabo13:09:37

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