LnL7 / vim-nix

Vim configuration files for Nix http://nixos.org/nix
MIT License
287 stars 26 forks source link

Unexpected unindent on inherit #12

Closed lheckemann closed 7 years ago

lheckemann commented 7 years ago

If I'm writing let bindings using the inherit keyword, it gets unindented one level — presumably because that's the behaviour for the in keyword which is a prefix of inherit. Would it be possible to get that unindent to only happen once a space has been added after in?

LnL7 commented 7 years ago

The in keyword isn't necessarily followed by a space, making this a bit more tricky. I remember trying to make this work properly when implementing it, but I couldn't find a way to trigger the indentation for both cases while the user is still typing.

let
  foo = 42;
  in
    ^ cursor, in<Return> or inherit?