Skip to content

variable.other.constant.ts only matches all-caps constant declarations #25989

Closed
@mjbvz

Description

@mjbvz

From @Janne252 on July 26, 2018 8:24

  • VSCode Version: 1.25.1
  • OS Version: Windows 10 Pro 64-bit

Steps to Reproduce:

  1. Open an empty folder in VS Code
  2. Create a new TypeScript file with the following content:
declare const Foo: string;
declare const BAR: string;
  1. Add the following setting to the workspace settings:
    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": "variable.other.constant.ts",
                "settings": {
                    "foreground": "#FF0000"
                }
            }
        ]   
    }
  1. Enable "Developer: Inspect TM Scopes"
  2. Inspect the TextMate scopes of the constants Foo and BAR
    image
    Note how the constant in all caps is scoped as variable.other.constant.ts
    image
    Note how the constant in camel case is incorrectly scoped as variable.other.readwrite.ts

Does this issue occur when all extensions are disabled?: Yes

Copied from original issue: microsoft/vscode#55119

Metadata

Metadata

Assignees

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