hey all! i finally tried to implement something similar to aggressive-indent-mode that is combined seamlessly with parinfer.
you can try it out here: http://oakes.github.io/paren-soup/
if you notice any odd behavior, please let me know. i'd love to integrate with with my various projects but i don't trust it yet 😄
👍
looks like it uses two-space indentation as a guide
for example:
(comment foo
bar)
[(comment foo
^ bar)]
[a (comment foo
^ bar)]
yeah and one limitation is that it doesn't currently adjust indentation when wrapping a form with delimiters
it’s tricky
so if you just keep spamming [
the bar
will indeed fall out of the comment block
@sekao: by “various projects”, how many do you have using this? 😄
http://nightcoders.net and the nightcode app?
right now, nightcode, nightlight, and http://nightcoders.net
hehe
i should just say night* from now on
haha
they all use nightlight? https://github.com/oakes/Nightlight
http://nightcoders.net does. nightcode uses paren-soup on its own
oh okay, so this is implemented inside paren-soup, which uses a custom parinfer from cross-parinfer
yep
the code for this particular feature is pretty awful right now but basically i'm using the same info from tools.reader that let me get accurate tab stop information
accurate?
i thought about revising the tab-stop part of the API: https://github.com/shaunlebron/parinfer/issues/125
well im not sure how it compares to the tab stop info you added, i think i implemented mine beforehand. i actually haven't tried just using the info from parinfer
i think it’s too customizable to make sense, but it was only returning the positions of the parent open-parens, and expecting the user to insert the indentations between them according to preferences
i have to head out, but I’ll look at cross-parinfer to see what we can merge back to core if appropriate
excellent job on night stuff 👏
thanks!
@sekao Great, I will definitely try that out.
What are the rules you’re using to decide when to run paren or indent mode?