CM6 python syntax highlighting

Hi,

I defined a syntax highlighting theme like the following:

export const jupyterHighlightStyle = HighlightStyle.define([
  { tag: tags.self, color: 'var(color-self)' },
  { tag: tags.definition(tags.name), color: 'var(color-def)' },
  { tag: tags.variableName, color: : 'var(color-variable)' },
  // etc
]) 

that I use with the python language extension. However, the self keyword is considered as a regular variable; same for the methods definition inside a class, the name of the method is considered as a regular variable. The only way to get the method name highlight is to define a rule for the function(propertyName)tag, however this color also apply to method invocation, which I don’t want to have.

Is that a bug in the parser or did I miss to define rules for some tags?

I found the mapping “tokens => tags” in this file this file, I could solve the function definition issue, however I don’t see a entry for the self keyword. Happy to open a PR if it is missing.

Edit: other issue I just found, the * operator is considered as a keyword.

self in Python is just a variable name, not a keyword, which is how @lezer/python treats it.