nim-lang / nim-mode

An emacs major mode for the Nim programming language
138 stars 46 forks source link

Wrong indentation of exported object field in type definition #234

Open AmaiKinono opened 3 years ago

AmaiKinono commented 3 years ago

Conforming Bugs

Please tell us below:

And describe your problem:

Enter this in nim-mode:

type
  NewType* = object
    field1*: string
    field2*: string

Mark them, call indent-region. Now it becomes:

type
  NewType* = object
    field1*: string
          field2*: string

I believe it's a problem related to the SMIE grammar, but I don't have enough knowledge on SMIE and parser/grammar things to fix this.