out of curiosity, does anyone have an idea why we don't have a fully working version of smart mode on emacs? Given Emacs is the mostly widely used clojure editor, i would have thought it would have gotten the most attention (due to the larger community).
I think it's because nobody has time to work on the elisp port.
However, parinfer-rust fully supports smart mode, and builds a dll which I'm told can be invoked from emacs. Not being an emacs user, I haven't done this.
(However, as the maintainer of parinfer-rust, I would certainly support those efforts.)
Thanks @eraserhd. It would seem vim also has a port. I fall into that category of dont have time to make it work and i'm currently looking at alternatives.
Clojure developers are always busy
I can take some blame for this 😉 I originally wrote the elisp port and have not kept it up-to-date with parinfer.js. I don't use emacs so it's not really a pain point for me.
I do think there would be value in updating the port. It's always nice to have "native" integration with the editor's language of choice. I feel similarly about the Python port + Sublime Text.
@chrisoakman I wasn't aware of your port, i having been using https://github.com/DogLooksGood/parinfer-mode. I would love to take the dive and fix it, i'm not sure even anything is really better then smart mode parinfer honestly. Everything else requires a lot of keybindings do achieve the same effect. I'm trying to compare it to Paxedit and lispyville.
Parinfer-mode is based off of the library from @chrisoakman 🙂, with a bunch of emacs niceties added on https://github.com/DogLooksGood/parinfer-mode/blob/master/parinferlib.el
mildly curious why you wrote the port to an editor you dont use. Thanks for the effort, honestly just curious what motivated you.
more importantly, roughly what kind of investment from a beginner would it take to update it?
I can’t speak for @chrisoakman, but from what I remember the port of parinfer was a lot easier before hand, when it was written in a lisp like style. Some time since then the reference implementation switched to a more imperative style (I think to make it easier for other editors to implement? Or just to reason about)
I haven’t fully read through it but if you wanted smart mode you could install this package locally and (require 'parinfer-smart)
instead of (require 'parinfer)
. From what I remember @doglooksgood got pretty far with it but ran into some bugs they didn’t have time to figure out.
https://github.com/DogLooksGood/parinfer-mode/blob/smart/parinfer-smart.el
I’ve also been kind of hankering for smartmode, which is why I’ve been paying attention. However, like you, I’ve been too busy to work on it =/
@drewverlee I don't have a strong answer other than I really wanted Parinfer to succeed and "I am a huge language nerd". I first did the Python port so parinfer could work in Sublime Text, then it just sort of snowballed and I ended up doing 3 more ports in like a month's time in order to reach more editors. There was a lot of momentum.
I think it could be updated to match parinfer.js. The first step would be to update the test suite.
I am going on a self-imposed programmer's retreat in April. Maybe I could pick it up as a project then. I feel like there is always a backlog of open source maintenance work to be done.
awesome! i'm glad you did. It's your time and you should use it on what makes you happy. I have gotten a lot of use out of your work already. If you start a pareon/whatever i would support it.
It has been a little frustrating how difficult it is to integrate Smart mode with various editors. When Parinfer was just Paren and Indent mode integrations were much simpler: you did not need any information about "the change" from the editing operation. You could just debounce the onChange
event and run those pure functions when it was ready.
Thank you! This is very kind 😄