Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

csEnclosed breaks highlighting in many cases #44

Open
idbrii opened this issue Apr 25, 2018 · 1 comment
Open

csEnclosed breaks highlighting in many cases #44

idbrii opened this issue Apr 25, 2018 · 1 comment

Comments

@idbrii
Copy link

idbrii commented Apr 25, 2018

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 0d9ebe2 added csEnclosed to allow something<ClassName>?

@idbrii
Copy link
Author

idbrii commented Apr 25, 2018

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

idbrii added a commit to idbrii/vim-csharp that referenced this issue May 4, 2018
idbrii added a commit to idbrii/vim-csharp that referenced this issue May 4, 2018
This highlights the braces in typeof and detects the type inside the
braces to be a class/interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant