-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
auto align colons in object literals, variables, and equals like WebStorm #11865
Comments
From @jrieken on October 25, 2016 7:12 Nah, the actual formatting smarts must come from an extension - TypeScript/JavaScript in this case. What we do it just calling into those formatters and apply their results |
This issue is now awaiting more feedback. This means we'd like to hear from more people who would be helped by this feature, understand their use cases, and possibly contrast with other proposals that might solve the problem in a simpler way (or solve many other problems at once). If this feature looks like a good fit for you, please use the 👍 reaction on the original post. Comments outlining different scenarios that would be benefited from the feature are also welcomed. |
recommend making compatible with http://eslint.org/docs/rules/indent |
Good feature. I also find it easier to read code when as much is aligned as possible from one line to the next (colons, equals, etc). |
+1 |
Another +1. We are really struggling to keep a good formatted code in our project, and we need to do it by hand in VSCode, as opposed to WebStorm :'(. By the way, you can get a temporal fix with this extension: Although the behaviour is different, and it uses the maximum indent "width" for the whole document. |
Most of the time, it's needed to format some part of code manually by developers to align the code vertically. For example: in the following code that is formatted by typescript formatter,
I changed format of some part to improve readability of the formatted code, After changing the code is like this
It would be nice, typescript formatter remember code that manually formatted part and protect them. According to my opinion if this is possible, no longer needed to align colons automatically. In connection with this property, following value can be added to settings file.
Otherwise to find a common solution that will be a solution for everyone is very difficult. Copied from issue: TypeScript/issues/14601 |
Really need this! |
+1 On this as well. I tested VSCode to see if we could use it as a replacement to Intellij/Webstorm and found this as a pretty key issue. Most of our codebase uses colon/equal alignment as the formatting preference and I gave up on VSCode when I found this. I would really love to use VSCode in development once this is fixed. |
I have to agree with johnsba1. The code formatting is one of the key issues that makes it really hard to switch over from WebStorm. I know VSCode lets people write all these third party plugins that supposedly help with formatting, but I haven't been able to find one that's particularly good. |
Would you please name other editors which is doing it on type script files? |
Hi, are there any changes in issue? It would be nice, if we can configure document format according to ESLint indend rules. |
WebStorm, PHPStorm, ... |
Any yes, no maybe on this one? Missing a parallel feature set to eslint |
I'm here because I wanted to switch from IntelliJ/Webstorm as well. VSCode just doesn't provide this feature. It's quite a shame. Are you guys still awaiting more feedback? |
+1 need. This is a standard in Golang and it aids readability greatly. |
+1, really need this feature in the next update |
How is this issue going? |
Pls make this come true |
So are we having this auto align feature in objects? |
From @kinergy on October 17, 2016 2:56
Using Format Code on a js file:
turns into:
It would be really nice to have a setting to align the beginning of var names, align the equals, and align the colons in object literals like WebStorm. I tried looking for an extension, but wasn't able to identify one.
Copied from original issue: microsoft/vscode#13841
The text was updated successfully, but these errors were encountered: