Skip to content

Allow for chain break configuration #1103

@brunotvs

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions