Skip to content

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

Open

Description

@Jaykul

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()

Activity

  1. changed the title [-]The "scope" names "variable.other.member" includes the dot separator[/-] [+]The "scope" named "variable.other.member" includes the dot separator[/+] on Aug 13, 2018
  2. omniomi commented on Aug 14, 2018

    @omniomi
    Contributor

    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

  3. keith-hall commented on Aug 23, 2018

    @keith-hall
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions