EditorSyntax
EditorSyntax copied to clipboard
The "scope" named "variable.other.member" includes the dot separator
First off: I think we should be lexing a property and a method rather than the generic member -- however, this bug is simply against the fact that the separator dot is being included in the scope.
I'm using VS Code 1.26.0-insider
For repro sake, I added this to my preference:
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "variable.other.member",
"settings": {
"foreground": "#e23de2"
}
},
]
},
And got this:

I expected only the words to be pink, i.e. only "Length" not ".Length" in:
$file.Length
I also did not expect it to affect the color of the method Delete() in
$file.Delete()
Good catch. The separator actually has its own scope that it should use (punctuation.separator...,) I must have missed that.
The property vs method question is interesting and variable.function does exist for methods.
https://www.sublimetext.com/docs/3/scope_naming.html#variable
for reference, the scope of the . was also mentioned at https://github.com/PowerShell/EditorSyntax/issues/107#issuecomment-393640603