chouzz / vscode-better-align

Better vertical alignment with/without selection in any language.
https://marketplace.visualstudio.com/items?itemName=Chouzz.vscode-better-align&ssr=false#overview
Apache License 2.0
39 stars 4 forks source link

I think it's aligning commas when Alt-A #121

Open jeffshumphreys opened 1 month ago

jeffshumphreys commented 1 month ago

powershell $target_table = "$($source_provider)_$($source_data_set)_data" # tmdb_movie_data, tmdb_tv_series_data, imdb_... powershell $columnDefs = $DatabaseConnection.GetSchema("Columns", @('', $target_schema, $target_table))|Select column_Name, type_name, nullable, ordinal_position, auto_increment, column_def, It's hard to show in here so I'll take a screenshot: image

I had pressed Alt-A. My settings: ``json "betterAlign.surroundSpace": {

    "colon": [
        0,
        1
    ],
    "assignment": [
        1,
        1
    ],
    "arrow": [
        1,
        1
    ],
    "comment": 2
}

``

A "comma": -1 option maybe?

jeffshumphreys commented 1 month ago

Update: looking in the formatter.ts I see "comma" is an option, so I added "comma" -1 to my settings and it fixed it, except for commas in line comments. So still a thing, but only in comments

jeffshumphreys commented 1 month ago

Update: separating lines by a "#" corrects the comma alignment in line comments on code lines. Sortofa workaround, but then you lose the "=" assignment alignment.