Sublime Forum

Scope for namespace is not working?

#1

entity.name.namespace/meta.path scope is not highlighting in C++. What to do now?

0 Likes

#2

Should I post this in another category?

0 Likes

#3

More explanation of what it is you’re seeing versus what you’re expecting to see might be helpful to others to know what it is you’re reporting.

0 Likes

#4

I am seeing this in sublime text:

And I want something similar to this:

In Sublime text Documentation, I saw there are scopes for namespace such as entity.name.namespace, meta.path and meta.namespace. But when I create my own new color scheme where I have used nothing but entity.name.namespace scope, I saw that nothing changed. And I downloaded some syntax definition for c++, but they use function definition for std::cout and this is not what I want. That’s why I think that there is something wrong in c++.sublime-syntax file in sublime text.

BTW I’m using sublime text 4.

0 Likes

#5

Now I understand that entity.name.namespace, meta.namepsace and meta.path are not the scopes that I was thinking. Sorry for being annoying. But is it possible to make my own scope that will work as I want???

0 Likes

#6

You can create an override on the existing syntax to modify its contents (you can also extend it to create a new syntax, though I believe that would add new rules while keeping the existing ones, which is probably not what you want).

That requires knowledge of how the syntax system works however, which is non-trivial if you aren’t already familiar with it.

0 Likes

#7

… especially not with syntaxes from C/C++ family

0 Likes