Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Preferred wrap length settings is automatically set back to 100 when both wrap-guide and Rust wrap are set to 72. #89

Open
fuzhouch opened this issue Nov 30, 2016 · 3 comments

Comments

@fuzhouch
Copy link

Hi folks,

This is a bug I recently found when using Atom with Rust-Language. Repo steps:

  1. Install a clean Atom with default wrap-guide package enabled.
  2. Install Rust-Language package.
  3. Set preferred wrap length in wrap-guide to 72 (recommended check-in length for Git).
  4. Set preferred wrap length in Rust-language to 72 (for same reason).
  5. Open any Rust source code file.

I expect the vertical line in opened source code file window is 72, but actually it will be set to 100.

The issue is not critical, but kinds of confusing because it looks like Rust-Language keeps a fixed line width (99) and don't allow it change.

BTW, I found the workaround is easy: Just make sure the wrap length are different between Rust-Language and default wrap-guide, for example, I set default wrap-guide to 72 but set Rust-language wrap guide to 73. Then the final setting will 73 when opening a Rust source code file.

@josh-berry
Copy link

Also seeing this issue. Mac, Atom 1.14.3, language-rust 0.4.9. Except in my case, I have the default line length of 80 set everywhere (globally, and in language-rust).

@KalitaAlexey
Copy link
Collaborator

KalitaAlexey commented Feb 27, 2017

Hello @fuzhouch and @josh-berry,
I would like to accept your PR if you made one.
I am sure it is easy to find the reason, but unfortunately none of us have time for this.

@zargony
Copy link
Owner

zargony commented Feb 28, 2017

Thanks for the detailed bug report

Related issue: #93 (language-rust sets the preferred line length to 99 since this is recommended Rust style, but people are confused about it).

However, I think this is probably not a language-rust issue. Since language-rust is just passing the preferredLineLength of 99 to Atom (which should be overridable in the package settings), I'd suspect that this is an Atom issue rather that this package's issue. Could you maybe report this to the Atom project? It looks like Atom gets confused between the global setting and the package setting. However it might also be that this isn't supported and they didn't intend settings to be used like this

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants