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

The names of subvariables defined in the class class in VSCode and the Clangd extension are not colored. #177

Open
CodingOIer opened this issue May 23, 2024 · 2 comments

Comments

@CodingOIer
Copy link

The names of subvariables defined in the class class in VSCode and the Clangd extension are not colored.
image
My code in image:

#include <cstdio>
#include <random>
#include <utility>
constexpr int MaxN = 1e5 + 5;
std::mt19937 rnd(std::random_device{}());
class node
{
  public:
    int x;
    int prio;
    int size;
    node *left, *right;
    node()
    {
        x = 0;
        size = 1;
        prio = rnd();
        left = nullptr;
        right = nullptr;
    }
    node(int a)
    {
        x = a;
        size = 1;
        prio = rnd();
        left = nullptr;
        right = nullptr;
    }
    void update()
    {
        size = (left == nullptr ? 0 : left->size) + (right == nullptr ? 0 : right->size) + 1;
    }
};
<omission more code>
@CodingOIer
Copy link
Author

In fact, it can works successfully in C/C++.
image

@CodingOIer
Copy link
Author

And, there are many problems when it runs with clangd, such as inline parameter reminders for functions and so on. Bearded Theme and clangd are both great extensions and I wouldn't want to lose either one.
image

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