Skip to content

The "scope" named "variable.other.member" includes the dot separator #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Jaykul opened this issue Aug 13, 2018 · 2 comments
Open

The "scope" named "variable.other.member" includes the dot separator #131

Jaykul opened this issue Aug 13, 2018 · 2 comments

Comments

@Jaykul
Copy link

Jaykul commented Aug 13, 2018

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:

image

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()
@Jaykul Jaykul changed the title The "scope" names "variable.other.member" includes the dot separator The "scope" named "variable.other.member" includes the dot separator Aug 13, 2018
@omniomi
Copy link
Contributor

omniomi commented Aug 14, 2018

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

@keith-hall
Copy link
Contributor

for reference, the scope of the . was also mentioned at #107 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants