Skip to content
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

Align Method Parameters By Parameter Name #66855

Closed
dkent600 opened this issue Jan 21, 2019 · 2 comments
Closed

Align Method Parameters By Parameter Name #66855

dkent600 opened this issue Jan 21, 2019 · 2 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation

Comments

@dkent600
Copy link

dkent600 commented Jan 21, 2019

With Editor: Tab Size set to "2" and the TypeScript Extension "Format on Save" set to true, when I save a file with the following:

  myMethod(
    param1: type
  , param2: type
  , param3: type
  )

VS Code produces this:

  myMethod(
    param1: type
    , param2: type
    , param3: type
  )

Tools like tslint, when checking for alignment, report that the parameter lines are not aligned.

Would be great if the formatter could leave these lines aligned as in the first example.

The rule would be something like "Align Method Parameters By Parameter Name"

@mjbvz mjbvz self-assigned this Jan 21, 2019
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Jan 21, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 21, 2019

We try to keep VS Code lean and we think the functionality you're asking for is great for a VS Code extension. Maybe you can already find one that suits you in the VS Code Marketplace. Just in case, in a few simple steps you can get started writing your own extension. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jan 21, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 21, 2019

Somewhat related to microsoft/TypeScript#11865

Try installing one of the third party formatting extensions for more advanced formatter options like this

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation
Projects
None yet
Development

No branches or pull requests

2 participants