I've been using web-mode for 3+ years now to code JavaScript. Thank you for the work you do on this project. 🙏
web-mode has trained me that Promise handling in JavaScript should be indented like this:
promiseTheWorld
.then((planet) => { log.info(`lol you got ${planet.name} instead`); })
.catch((error) => {
log.error(`lol the universe exploded`);
app.quit();
});
But my team wants to do it like this:
promiseTheWorld
.then((planet) => { log.info(`lol you got ${planet.name} instead`); })
.catch((error) => {
log.error(`lol the universe exploded`);
app.quit();
});
Is there a way to disable indentation on chained method calls? The documentation describes how to disable some lineups—lineup-args, lineup-calls, lineup-concats, lineup-ternary—and I thought disabling lineup-calls might do it, but it doesn't seem to be affecting chained method calls. I also reviewed the source code and didn't see anything that seemed to do this. I'm happy to donate if this is an enhancement.
By my read of this post I think the thing I'm fighting here is indentation, not lineup. Basically I want to tell web-mode to not indent the line if it's JavaScript and starts with . 🤔
I've been using web-mode for 3+ years now to code JavaScript. Thank you for the work you do on this project. 🙏
web-mode has trained me that Promise handling in JavaScript should be indented like this:
But my team wants to do it like this:
Is there a way to disable indentation on chained method calls? The documentation describes how to disable some lineups—lineup-args, lineup-calls, lineup-concats, lineup-ternary—and I thought disabling lineup-calls might do it, but it doesn't seem to be affecting chained method calls. I also reviewed the source code and didn't see anything that seemed to do this. I'm happy to donate if this is an enhancement.
Here's my config:
Here's my config when I try disabling lineup-calls, which doesn't seem to affect chained calls: