Fork me on GitHub
#parinfer
<
2017-01-26
>
sekao21:01:53

hey all! i finally tried to implement something similar to aggressive-indent-mode that is combined seamlessly with parinfer.

sekao21:01:36

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 😄

shaunlebron22:01:20

looks like it uses two-space indentation as a guide

shaunlebron22:01:06

for example:

(comment foo
         bar)
[(comment foo
^         bar)]
[a (comment foo
 ^   bar)]

sekao22:01:34

yeah and one limitation is that it doesn't currently adjust indentation when wrapping a form with delimiters

shaunlebron22:01:57

it’s tricky

sekao22:01:01

so if you just keep spamming [ the bar will indeed fall out of the comment block

shaunlebron22:01:05

@sekao: by “various projects”, how many do you have using this? 😄

sekao22:01:25

right now, nightcode, nightlight, and http://nightcoders.net

sekao22:01:43

i should just say night* from now on

sekao22:01:12

http://nightcoders.net does. nightcode uses paren-soup on its own

shaunlebron22:01:56

oh okay, so this is implemented inside paren-soup, which uses a custom parinfer from cross-parinfer

sekao22:01:53

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

shaunlebron22:01:23

i thought about revising the tab-stop part of the API: https://github.com/shaunlebron/parinfer/issues/125

sekao22:01:28

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

shaunlebron22:01:49

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

shaunlebron22:01:02

i have to head out, but I’ll look at cross-parinfer to see what we can merge back to core if appropriate

shaunlebron22:01:26

excellent job on night stuff 👏

cfleming22:01:54

@sekao Great, I will definitely try that out.

cfleming22:01:15

What are the rules you’re using to decide when to run paren or indent mode?