You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can try to take a look at this. The indenting regex is notoriously tricky. A friend of mine tried to have a go at fixing this and eventually gave up in frustration 😉.
I don't necessarily agree that the later example isn't normally how elixir code is formatted. I use that formatting for maps and keyword lists quite often. That said, it would be nice to make the "lisp" style formatting work out of the box. What I think we would need to do is add indentation rule that does something like finds a %{ or [ and a , on the same line then it should indent. IIRC there are more edgecases then that. If you would like to take a look at it that would be great. Otherwise I can but it'll be a bit before I can get to it.
If i try to indent a multiline map the plugin will indent the map incorrectly. For example, the auto-indented map will look like this.
Where it should be
of note, if you try to make a map with newlines (i.e. javascript style), it auto-indents fine.
however, this is not usually how elixir code is formatted. The same is true for keyword lists as well as structs.
The text was updated successfully, but these errors were encountered: