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

nimpretty messes alignment, after import statement #9811

Closed
kobi2187 opened this issue Nov 27, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@kobi2187
Copy link
Contributor

commented Nov 27, 2018

example:

import future,
       strutils

proc issue() =
       echo "formatting issue"

nimpretty remembers the indentation from the import block, and uses it later on.

@narimiran narimiran added the nimpretty label Nov 27, 2018

@otofu-tofu otofu-tofu referenced this issue Apr 4, 2019

Merged

fixes #9811 #10961

@Araq Araq closed this in 94a2113 Apr 4, 2019

@nc-x

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2019

Reopen? AFAICT, this didn't get fixed by #9811, it was only a documentation change.

@narimiran narimiran reopened this Apr 4, 2019

@Araq

This comment has been minimized.

Copy link
Member

commented Jun 7, 2019

By design nimpretty detects the indentation by the first "section of spaces" that it encounters. Use --indent:2 switch to prevent it from doing that.

@Araq Araq closed this Jun 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.