FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bad indentation of hash with symbol-array literal values · Issue #427 · vim-ruby/vim-ruby · GitHub

Repository navigation

Bad indentation of hash with symbol-array literal values #427

Description

Using e367f7b the following code is misindented:

x_to_y_mapping = {
  'x_one' => %i[
    y_one
    y_two
  ],
  'x_two' => %i[
    y_three
    y_four
  ]
}

becomes:

x_to_y_mapping = {
  'x_one' => %i[
  y_one
  y_two
  ],
    'x_two' => %i[
  y_three
  y_four
  ]
}

the issues as I see it being:

  1. The symbol-array literal elements are dedented to align with the hash key
  2. The second key is indented relative to the first key

N.b. the following is correctly indented:

x_to_y_mapping = {
  'x_one'=> [
    :y_one,
    :y_two
  ],
  'x_two' => [
    :y_three,
    :y_four
  ]
}

Activity

  1. zhengpd commented on Oct 26, 2021

    Same issue here. Every time I need to manually fix the indentation after doing ==. Really annoying. Anyone has solution/workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL