vim-erlang / vim-erlang-runtime

Erlang indentation and syntax for Vim
https://vim-erlang.github.io
101 stars 29 forks source link

Indent type specifications correctly #2

Open hcs42 opened 11 years ago

hcs42 commented 11 years ago

The indentation is unaware of -type, -spec and -opaque type specifications.

Emacs handles them nicely, so the same behavior should be implemented here.

hcs42 commented 10 years ago

It is not always obvious what "correct" means.

Examples of Emacs indentations:

-spec f() ->
               a() 
                   | b()
                   | c().

-spec long_function_name() ->
                                a() 
                                    | b()
                                    | c().

-spec long_function_name(parameter_type()) ->
                                a() 
                                    | b()
                                    | c().