Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emacs: rust-indent-method-chains indents beginning of line oddly #13

Closed
steveklabnik opened this issue Feb 2, 2015 · 4 comments · Fixed by #22
Closed

Emacs: rust-indent-method-chains indents beginning of line oddly #13

steveklabnik opened this issue Feb 2, 2015 · 4 comments · Fixed by #22

Comments

@steveklabnik
Copy link
Member

Issue by ProjectMoon
Monday Jan 26, 2015 at 10:29 GMT

For earlier discussion, see rust-lang/rust#21650

This issue was labelled with: A-infrastructure in the Rust repository


Trying out rust-mode in emacs, and set rust-indent-method-chains because I like me some aligned dots.

It does what it advertises, but for some reason shoves the beginning of the line (and thus the lines underneath it) over one more tab.

I'm using spaces for tabs, configured to width 4.

What I expect:

let x = thing.do_it()
             .aligned()
             .more_alignment();

What I get:

    let x = thing.do_it()
                 .aligned()
                 .more_alignment();

I am using el-get to install rust-mode so it should be pulling off the latest master.

@nikomatsakis
Copy link
Contributor

Yes, I've observed this as well and it made me sad because the option is so beautiful when it works.

@nikomatsakis
Copy link
Contributor

I'm having problems identifying just when this problem arises. It's not as simple as presented in the topic here. A standalone example would be helpful.

@nikomatsakis
Copy link
Contributor

Ah, hmm, maybe it is. I just didn't have the option fully enabled.

@nikomatsakis
Copy link
Contributor

I have a kind of working patch for this. It's sort of ad-hoc. I'm going to use it for a bit locally and submit it if it seems to be going ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants