intellij-erlang icon indicating copy to clipboard operation
intellij-erlang copied to clipboard

Some exprs formats

Open zyuyou opened this issue 1 year ago • 6 comments

  1. Add block before ERL_IMPORT_FUNCTIONS.
  2. Maybe Expr indent process.

zyuyou avatar Mar 29 '23 04:03 zyuyou

Hi there, I would love to see this merged so that I don't have an IDE mess with maybe_expr.

ShawnMcCool avatar Apr 10 '23 09:04 ShawnMcCool

Hi there, I would love to see this merged so that I don't have an IDE mess with maybe_expr.

not really, maybe_expr has supported in IDEA-2023. and this patch just for indent format.

zyuyou avatar Apr 12 '23 03:04 zyuyou

I can't understand what does 1st change do? How to test it? Please reset your master to ignatov:master and cherry-pick 70fdc3a and 1b49afa

kvakvs avatar Apr 22 '23 03:04 kvakvs

Add block before ERL_IMPORT_FUNCTIONS.

Before:

-import(lists, [
reverse/1, 
keyreplace/4
]).

After:

-import(lists, [
    reverse/1, 
    keyreplace/4
]).

Maybe Expr indent process.

Before:

maybe
true ?= foo(),
    ok
else 
    false ->
        false
end,

After:

maybe
    true ?= foo(),
    ok
else 
    false ->
        false
end,

@kvakvs

zyuyou avatar May 04 '23 15:05 zyuyou

Thanks for the PR, could you please add some formatter tests?

ignatov avatar Jul 06 '23 21:07 ignatov

Thanks for the PR, could you please add some formatter tests?

It's done.

zyuyou avatar Sep 13 '23 16:09 zyuyou