Sublime Forum

Espresso Libre & Python classes

#1

Hello,

I love the Espresso Libre theme but class names are not colored.

I tried to look into the theme file but i can’t find how to change it. I would need a little help on that.

0 Likes

#2

Maybe the Espresso Soda theme does what you want? Look here: github.com/buymeasoda/soda-theme

This page provides two themes that change the way the tabs look and so on. This isn’t what you want. But near the bottom of the readme there are instructions on installing the syntax highlighting themes that come with it, and that might do what you want.

If that doesn’t help, you can try to tweak your theme. To do this, you need to know the “scope name” for class names. So put the cursor on a class name and invoke the console and type the following:

view.scope_name(view.sel()[0].begin())

When I do that on a PHP class name, ST responds with this:

u'text.html.basic source.php.embedded.block.html meta.class.php entity.name.type.class.php '

text.html.basic and source.php.embedded.block.html don’t seem to be right (because they apply to the surrounding HTML), and meta.class.php refers to the whole class definition, not just the class name, I thikn. But entity.name.type.class.php seems right, and I would try to set a color for entity.name.type.class to catch all languages, not just PHP.

Hm. On a Python class name, I get this:

u'source.python meta.class.python entity.name.type.class.python '

So, yes, entity.name.type.class seems to be about right.

0 Likes

#3

Thanks a lot !

0 Likes