sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

How is max_line_length enforced / used? #210

Closed aaronmagi closed 1 year ago

aaronmagi commented 6 years ago

Hi,

I'm trying to understand how max_line_length is used within Atom using your plugin. Typically in Eclipse if I have a maximum line length set I have to select the area and hit crtl + shift + f it will reformat the code to set the proper maximum line length. How is this achieved in Atom using this package?

Thank you

editorconfig code:

max_line_length = 160

florianb commented 6 years ago

Hi @aaronmagi - we're setting Atom's setting "Preferred Line Length" according to the max_line_length. We leave it to Atom to "enforce" the line length. In fact it depends on Soft/Hard Wrap what happens - the soft wrap just breaks the line visually, the hard wrap adds a newline. In both cases the Wrap-Guide should be shown. But that feature might be broken since we need to follow up the latest API-changes.

zwing99 commented 6 years ago

i think this is broken. it does not seem to be updating for me either, the guides that is.

awkaiser commented 6 years ago

Atom 1.23.3 + editorconfig 2.2.2:

Indeed, guides display at 80 chars when .editorconfig max_line_length is 120

thcolin commented 6 years ago

Same with Atom 1.24.0 and editorconfig 2.2.2

manuelbieh commented 6 years ago

Same with Atom 1.27.1 (and editorconfig 2.2.2).

sindresorhus commented 1 year ago

Closing as Atom is abandoned.