zargony / atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144
MIT License
116 stars 33 forks source link

Enabling / Disabling atom-language-rust Moves the Wrap Guide Line #138

Open JosephTLyons opened 6 years ago

JosephTLyons commented 6 years ago

I frequently switch my wrap guide setting from 100 columns to 80 columns, when switching from coding to writing documentation, but I recently noticed that when i switch to 80 columns, the wrap guide doesn't move in Rust files. I didn't know what was causing it, but when I disable this package, the wrap guide goes back to respecting the setting I have set for it.

Setting at 80 columns: screen shot 2018-06-29 at 4 50 18 am

Wrap guide is actually at 100: screen shot 2018-06-29 at 4 50 10 am

Disabling this package: screen shot 2018-06-29 at 4 51 33 am

Wrap guide jumps back: screen shot 2018-06-29 at 4 51 41 am

JosephTLyons commented 6 years ago

Even with the "Soft Wrap at Preferred Line Length" option selected, the package isn't respecting where I set my Wrap Guide at.

Baelyk commented 6 years ago

From what I can tell what is going on here is that this package creates a rust language specific Preferred Line Length setting ('preferredLineLength': 99), but in the package's settings it says it is using Atom's default of 80, even though it is actually using its default of 99. This is the only issue that I have observed.

screenshot 2018-08-23 23 12 39

Disabling this package cedes "control" of the line length to the global setting, which is what you are noticing. Re-enabling allows it to take back control.

I assume this setting is in place because it is typical Rust to have such a line length, while other languages might not have a typically used length. So I believe what you are observing is the intended behavior of this package.

Although I am curious, why do you want to change the line length in your Rust files so frequently?