idris-hackers / idris-vim

Idris mode for vim
221 stars 52 forks source link

Wrong indentation of clauses on <LocalLeader>m #33

Open dkasak opened 9 years ago

dkasak commented 9 years ago

The indentation of clauses added by <LocalLeader>m depends on the position of the cursor at the time of invocation. Given the following example,

data Foo = Bar
         | Baz
         | Quux

foo : Foo -> Foo
foo Bar = ?foo_rhs

placing the cursor on the 'B' of the Bar pattern, followed by invoking <LocalLeader>m results in this

foo : Foo -> Foo
foo Bar = ?foo_rhs
    foo Quux = ?Bar_rhs_1
    foo Baz = ?Bar_rhs_2

Invoking the command at the beginning of the line works as expected, placing the latter two equations in the first column.

mheinzel commented 7 years ago

It was fixed upstream in Idris-lang/Idris-dev#3869 (but will of course take some time to become part of a release), so this can be closed.