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

Aberta
#131 2 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
45/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Estagnada
Stack de tecnologia
powershell
Domínio
tooling

Direção de pesquisa

Reproduce the scope coloring in VS Code using the provided editor.tokenColorCustomizations and the examples $file.Length and $file.Delete(). Inspect the syntax scopes assigned to the dot, property name, and method call; done means variable.other.member no longer includes the separator or colors the method.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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()
Linguagem predominante
PowerShell
Estrelas
151
Forks
55
Métricas de merge de PRs
Nenhum PR com merge em 30d

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de PowerShell/EditorSyntax

Todas as issues de PowerShell/EditorSyntax

Issues semelhantes

Mais issues de DevTools

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.