Skip to content

Problem with indentation of Promises #105

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

Closed
JuanLucha opened this issue Feb 12, 2017 · 2 comments
Closed

Problem with indentation of Promises #105

JuanLucha opened this issue Feb 12, 2017 · 2 comments

Comments

@JuanLucha
Copy link

I'm using Promises and usually put the .then() and the .catch() in different lines than the invocation of the method returning the Promise. But the plugin is not indenting it correctly.

It should be:

this.aService.getAll()
  .then()
  .catch()

But actually it is:

this.aService.getAll()
.then()
.catch()

Thanks for the awesome plugin.

@JuanLucha
Copy link
Author

I have seen that there is a PR that actually fix this, but it's frozen since the last year!

#98

@leafgarland
Copy link
Owner

I have tried using the latest indent from pangloss/vim-javascript. It will indent as you have specified here but only if you add 0. to 'indentkeys'. It looks like there were various issues raised where people wanted the exact opposite of this issue and so they have settled on using indentkeys. I like this approach. What do you think?

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

No branches or pull requests

2 participants