Skip to content

[Feature Request] keep-aligned #31

@zojize

Description

@zojize

Clear and concise description of the problem

I've always found it annoying that formators unnecessarily format well-aligned code blocks, making them terser but ruining the readability and aesthetical appeal, especially for stuff like const matrices and long equations. For example:

export const matrix = [
  1, 0, 0,
  0.866, -0.5, 0,
  0.5, 0.866, 42,
]

Formators would typically align the code above as such, but it often would be ideal to vertically align them by the commas like this:

// @keep-aligned , , ,
export const matrix = [
  1    , 0    , 0 ,
  0.866, -0.5 , 0 ,
  0.5  , 0.866, 42,
]

I find this library to be the perfect solution to implement and automate this process, hence the feature request.

Suggested solution

PR

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions