WarWithinMe / better-align

A vscode extension to provide better vertical alignment
Other
75 stars 39 forks source link

Weird align behaviour? #71

Open RenanLazarotto opened 3 years ago

RenanLazarotto commented 3 years ago

I'm trying to format this snippet of code using Align command: Captura de tela de 2021-02-09 10-11-24

It's giving me this as result: 2021-02-09 10 11 48

However, I was expecting something more like this: 2021-02-09 10 12 06

Is this possible or I am doing something wrong?

sebastiencyr commented 3 years ago

I'm getting a similarly weird behavior:

Original

$term = get_term( $term_id, Theme::TAX_EVENT_LANG );
$langs[] = $term->name;

Result:

       $term = get_term( $term_id, Theme::TAX_EVENT_LANG );
$langs[]     = $term->name;

Expected:

$term    = get_term( $term_id, Theme::TAX_EVENT_LANG );
$langs[] = $term->name;

This is with indent base set to dontchange and surroundSpace is unchanged:

"alignment.surroundSpace": {

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