fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

web-mode makes weired indentation in arrays #1212

Closed drmgc closed 2 years ago

drmgc commented 2 years ago

Often, web-mode makes weird indentation in arrays: first line indented properly, but next lines are indented twice.

This behaviour found mostly in php:

array(
    array( 'name' => 'Add', 'url' => '/add/', 'rules' => array() ),
        array( 'name' => 'List', 'url' => '/list/', 'rules' => array() ),
        array( 'name' => 'Sections', 'url' => '/section/', 'rules' => array() ),
)

But also found in typescript mode:

[
  new NavItem('Home', '/'),
    new NavItem('About project', '/about-prj'),
    new NavItem('About', '/about'),
]

How to fix this behaviour?

fxbois commented 2 years ago

seems to be fixed with last commit please reopen if needed