-
Notifications
You must be signed in to change notification settings - Fork 28.8k
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
JavaScript - Indentation broken since 1 or 2 versions of vscode #36203
Comments
@patrickjane what language are you editing when this happens? It is not clear from your description.
start code with 'code --disable-extensions` |
Sorry, I forgot to mention. Its javascript.
Yes this what I could find out, however I am starting vscode with the icon in the applications folder, so I have no idea where I just "completely"(*) removed vscode and downloaded it again, without any change. Currently the only extension I have installed is a theme, but even after the fresh install w/o any extension I'll have the same problem. --
|
I can reproduce the problem when editing a JavaScript file. It looks like the indentation rules in the language configuration do not handle this case. |
We reverted the requested indentation behavior due to #30933. As it was very difficult to support all formatting and indentation styles, we opted to go with the least invasive one (even though it requires an extra tab in this instance) Closing as as-designed |
Very unsatisfying reply, to be honest. This is the first code editor I use which cannot handle indenting of a simple non-bracketed if (vim, emacs, xcode, qtcreator, atom can handle that, to name just a few).
I would therefore consider this a bug in vscode. If its by design, then its a bug in design. Maybe some more options regarding indentation would help. Or maybe predefined settings to support most major styles. |
Steps to Reproduce:
if (xxx)
Enter
and also:
if (xxx)
Enter
Enter
at the end of the new lineIn other words:
instead of
This is for editing javascript code, haven't tried any other language.
Its especially annoying since vscode auto-formats indentation like this when moving lines (via c&p or alt+arrow).
The same issue was reported already here somewhat around the beginning of the year, and marked fixed. However I started having this issue since sept or maybe august (so the pre-pre-version of the current one).
Is there a new setting which is supposed to cover this, or is it a bug?
Reproduces without extensions: No idea how to do this
[edit]
Those are my settings:
The text was updated successfully, but these errors were encountered: