Closed haoxianhan closed 2 years ago
I use your repo's new branch maybe_expr
in recent days, I generally use a few kinds of maybe
block such as [test/test_syntax.erl](https://github.com/vim-erlang/vim-erlang-runtime/pull/54/files#diff-eb85353a0f590a9c2ad4d6aa3288e4c61837b8589ac6e056e3c6720500b0fd32)
. It did work fine so far.
Thank you for the feedback. Would you force push the commit in my branch to haoxianhan:master? Afterwards I could merge the PR.
I've updated my master branch, thanks for the review. 👍
Thank you for your contribution.
I pushed a commit with a few updates to https://github.com/hcs42/vim-erlang-runtime/commits/maybe_expr. Could you check it?
A few notes:
test_indent.vim
. I rebased themaybe
commit on the top of the new master.My modifications to
indent/erlang.vim
were mostly about handlingmaybe
andelse
similar toreceive
andafter
. The indentation script handlesreceive
andafter
mostly well in different kinds of non-typical code layout, so addingmaybe
andelse
made sure that we handle them well too. Just one example: without the modifications, the script failed to indentcatch
expressions after themaybe
keyword.if already empty
from a comment in line 595. Now I added it back.maybe
totest_indent.vim
. These test cases are good way to find the edge cases I mentioned in point 3. The README contains a Developing and testing the indentation script section that is useful when working with the indentation script and its test file.