microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
158.92k stars 27.79k forks source link

Option to easily modify recently changed auto-indent settings for those who do not use 1TBS in JavaScript #212037

Open wwoodsTM opened 2 weeks ago

wwoodsTM commented 2 weeks ago

I have used vscode for years with Allman-style braces in JavaScript. I realize obviously I am in the minority with this practice, but I started coding with C/C++ and it has stuck, at least for my own personal projects. In the most recent release of vscode, there was a change to the JavaScript language config file that makes it to where any new lines after the start of an if/while/for auto-indent, treating it like a brace-less block I am assuming. In my case, this is not what I intend, I am simply trying to type the following curly brace on its own line and having to back it up every time while trying to do what is ingrained in muscle memory is not fun.

If there is an option to fix this that is reachable from settings menus or settings.json, I could not find it. I ended up creating my own custom extension just to solve the issue where I reversed the change. I cannot imagine I am the only one that did not love this recent change as far as those who do not always use 1TBS in JavaScript. If I missed some option or setting somewhere, my apologies and sometimes I can miss the obvious, but in the case that it does require making your own extension as I did, there might be some consideration of exposing some of this to at least the settings.json file.

Thank you.