Let's assume I have a JavaScript file with the following content and the cursor placed at the pipe symbol (|):
class ItemCtrl { getPropertiesByItemId(id) { return this.fetchItem(id) .then(item => { return this.getPropertiesOfItem(item); }); }| } If I now hit enter, the code changes in the following way:
class ItemCtrl { getPropertiesByItemId(id) { return this.fetchItem(id) .then(item => { return this.getPropertiesOfItem(item); }); } | } It wrongly aligns the closing curly brace with the return statement, when it should be aligned with the method definition. I know that the formatting inside the function is not the best but I still would rather disable that feature to prevent weird things like that from happening.
I already set editor.autoIndent to false but it still keeps happening. Is there any other way, how I can turn this feature off entirely? (or make it work in a smarter way)
editor.autoIndentto true. Seems like a bug to me or my installation is messed up.