OrangeT / vim-csharp

Enhancement's to Vim's C-Sharp Functionality
117 stars 39 forks source link

csEnclosed breaks highlighting in many cases #44

Open idbrii opened 6 years ago

idbrii commented 6 years ago

csEnclosed breaks highlighting in lambdas passed into functions, comments inside if conditions, etc

Example C# code:

public static void MakeRequest(Action<Action<ErrorCode?>> request)
{
    if (
            // most likely
            IsValid()
            // also possible
            || IsEmergency())
    {
        request(err => {
            // Explanation for double action here. Unhighlighted except for word 'double'.
            if (Time.time < response_valid_until)
            {
                complete(err);
            }
        });
    }
}

Even adding csComment to csEnclosed's contains only fixes the comment. The if is still unhighlighted.

Looks like 0d9ebe23d998bc0b814b047c05e1fd5a5e916ebc added csEnclosed to allow something<ClassName>?

idbrii commented 6 years ago

Removing csEnclosed and nextgroup=csEnclosed from csTypeOf resolves this, but I don't understand what the code was doing.