Stillat / vscode-antlers-language-server

Provides rich language features for Statamic's Antlers templating language, including code completions, syntax highlighting, and more.
https://antlers.dev
MIT License
36 stars 3 forks source link

Nested Arrays are not formatted as expected #83

Open o1y opened 7 months ago

o1y commented 7 months ago

Describe the bug Nested arrays are reduced to a single line.

Impacted Products Which Antlers Toolbox products does this bug apply to?

Versions and Other Plugins/Extensions Please include the product version you are reporting a bug for. If you are reporting a bug for products such as Antlers Toolbox for VS Code or the Antlers Prettier Plugin, please include a list of other configured extensions or plugins if you believe they are contributing to the problematic behavior.

To Reproduce Before

{{
    _array = [
        'one' => 1,
        'two' => 2,
        'three' => [
            'four' => 4,
            'five' => 5
        ]
    ]

    _value = _array['three']['five']
}}

After

{{ _array = ['one' => 1, 'two' => 2, 'three' => ['four' => 4, 'five' => 5]]_value = _array['three']['five'] }}

Expected behavior Either the nested array is formatted like the input, or at least there should be a space between the two variables if formatting nested arrays is not supported yet.