Skip to content

Opening curly not recognized in lambda without space #704

Description

@alexr00

Checklist

  • This problem exists even with the setting "C_Cpp.enhancedColorization": "Disabled"

If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose

The code with a problem is:

int main() {
	auto add = [&](int a, int b) -> int{
		return a + b;
	};
	return 0;
}

The opening curly doesn't get the punctuation.section.block.begin.bracket.curly.lambda.cpp unless you add a space before it.

It looks like:

Image

It should look like:

add a space and it bacame normal

Image

Originally from @leibidontknow in microsoft/vscode#305042

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions