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

Underlines break Ruby code indentation for parenthesis-less method calls #1296

Closed misaka closed 5 months ago

misaka commented 6 months ago

Parenthesis-less method call args were previously reported in the issue https://github.com/fxbois/web-mode/issues/1047 and fixed with the commit https://github.com/fxbois/web-mode/commit/c8a3b33e088d2a910c000804966b804bba33f982. However I'm finding that this breaks when the method name has underscores in it:

<%= render_to_string partial: 'some_partial',
 locals: {
     icon: nil,
     errors: [],
     title: 'Title'
 } %>

This should indent similar to how it would if render_to_string was replaced with render:

<%= render_to_string partial: 'some_partial',
                     locals: {
                         icon: nil,
                         errors: [],
                         title: 'Title'
                     } %>

<!-- The same for render: -->
<%= render partial: 'some_partial',
           locals: {
               icon: nil,
               errors: [],
               title: 'Title'
           } %>

This was tested with on a vanilla install emacs-plus (homebrew package) with an empty .emacs that only pulled in web-mode.

Output of emacs-version:

GNU Emacs 29.1.50 (build 1, aarch64-apple-darwin22.5.0, NS appkit-2299.60 Version 13.4.1 (c) (Build 22F770820d)) of 2023-08-02

And web-move-version: 17.3.17

Thanks for the great work on web-mode!

fxbois commented 5 months ago

it is now fixed