Can you set clang-format's line length?

The configuration option responsible for it is called ColumnLimit. You can remove the column limit by setting it to 0.

ColumnLimit: 0

Find ColumnLimit (under "Configurable Format Style Options" heading) on that page and you'll find the following statement:

ColumnLimit (unsigned)

The column limit.

A column limit of 0 means that there is no column limit. In this case, clang-format will respect the input’s line breaking decisions within statements unless they contradict other rules.

Source: Clang-Format Docs (v4.0.0, latest). Italics added for emphasis.

So, just like the docs say, set...

ColumnLimit: 0

... and you should be set.

Tags:

Clang Format