Fork me on GitHub
#vim
<
2022-06-06
>
sheluchin13:06:04

For some reason when I have a hanging indent and I edit the top level quickly, the indent gets messed up. If I type very slowly, everything stays aligned. Anyone know why this could be?

(def foo [1
            2
            3])
If I edit foo and start typing something out quickly, like foobar:
(def foobar [1]
         2
         3)

Noah Bogart13:06:39

Are you using parinfer or paredit or something similar?

sheluchin13:06:55

I have eraserhd/parinfer-rust and vim-iced, and vim-iced uses vim-sexp, which has it's own paredit-like thing.

Noah Bogart13:06:28

try removing one of those and see if the problem continues. that'll help you narrow down the source of the issue.

Noah Moss14:06:23

don't have a solution, but as another data point, I've noticed the same thing with parinfer-rust and vim-iced

sheluchin18:06:41

If I disable Parinfer completely with :ParinferOff, the alignment doesn't work at all. Disabling vim-sexp's Paredit mode with let g:sexp_enable_insert_mode_mappings=0 and/or vim-iced's auto-indentation with let g:iced_enable_auto_indent = v:false doesn't seem to have any impact. @U021MPXUQBF the only thing that does seem to fix it is let g:parinfer_mode='paren', but then parens don't seem to get auto-balanced, which sucks even more IMO. I wonder if other users of parinfer-rest are seeing the same behaviour.

uochan21:06:03

I'm also a user of parinfer-rust and vim-iced, but it should be a parinfer-rust side problem. I could reproduce the problem by disabling vim-iced and typing much faster. But at my normal typing speed, there is no problem.

sheluchin21:06:45

I run into it fairly often. I think it also causes an issue on some pastes as well as substitutions, but it is inconsistent. I'll create a parinfer issue.