Skip to content

Allow for chain break configuration #1103

Description

@brunotvs

Example behavior:

chain_break_at = "Always"

Before formating:

local x = object:method(argument)
local y = object:method(argument):method(argument)

After formating:

local x = object:method(argument)
local y = object:
  :method(argument)
  :method(argument)

There could be multiple options:

  1. "Always" - Always breaks chained expressions
  2. N - Breaks when there are at least 'N' chained expressions ("Always" and 1 are equivalent, N should be always greater than 0?)
  3. "Auto" - Based on column_width, current behavior

Activity

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

    enhancementNew feature or requestrequires optionThis feature request would require option configuration

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions