Python Identifier selectors


I have found a variant of the Monokai theme online that is, for me at least, much more clear and appealing and I’m trying to emulate it in Atom… but with limited success.

I have started editing the dark-monokai theme as it seemed the closest but am stuck on a few things.

Here is how I would like the theme to look:
And here is how I managed to make it look:

What I cannot find for the life of me is a well documented list of selectors. Basically the ones i need are:

  1. Selector for variable names, so i could make them green(atom-text-editor.variable is a no-go for some reason, mybe I’m doing something wrong)

  2. Something for “lambda” to be treated as any other keyword, or is there something specific for it?

  3. A selector for operators, =,+,*, etc.

I tried searching for similar topics but nothing worked, is this a known issue or am I just plain dumb?


There isn’t one, unfortunately. This is something that I feel should have been standardized three years ago when Atom was made open-source, but that didn’t happen, so themes basically have to be built on existing themes.

For finding how to color a specific type of highlighted term, you have two options. You can look at the language grammar, or you can open a file with the language active, type a string that will match the given term, and use the developer tools (View -> Developer -> Toggle Developer Tools) to observe what classes have been applied to it.

Note that, for the sake of keeping CSS rules separate, Atom adds the string syntax-- to every class name applied by a grammar. Make sure to add that in your syntax theme.