ElmCast / elm-vim

Elm plugin for Vim
BSD 3-Clause "New" or "Revised" License
572 stars 102 forks source link

Fix syntax highlighting for `case` #179

Open basile-henry opened 5 years ago

basile-henry commented 5 years ago

The keyword case wouldn't get highlighted properly when there was any non-whitespace character on the same line before it.

Often elm-format puts case on a new line, but not always, for example:

view x =
    div
        []
        (case x of
            [] ->
                text "foo"

            _ ->
                text "bar"
        )

Note: This PR might have some other effects on features I am not familiar with. The modified line is in a block of vim script with a comment saying "Folding". It is possible my changes affect folding as well, and I am not entirely sure how to test that.