Synxtax color entity.name.type not validated for [type] over storage.type scope

Open
#179 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
powershell
Domain
tooling

Research direction

Start by reviewing powershell.tmLanguage.json and reproducing the reported [string] type and function statement in VS Code with the listed tokenColorCustomization settings. Compare the scopes assigned to each construct with the expected PowerShell ISE colors; done means the type and statement can be distinguished as described, with focused validation for the grammar change.

Written by the indexing model from the issue text.

Description

Environment
  • Editor and Version:
    Visual Studio Code
    Version: 1.35.0 (system setup)
    Commit: 553cfb2c2205db5f15f3ee8395bbd5cf066d357d
    Date: 2019-06-04T01:18:19.664Z
    Electron: 3.1.8
    Chrome: 66.0.3359.181
    Node.js: 10.2.0
    V8: 6.6.346.32
    OS: Windows_NT ia32 10.0.17763

  • Your primary theme: PowerShell ISE

Issue Description

The entity.name.type is not validated over storage.type when defined in settings.json nor in theme.json.
When defining a type, i.e. [string], and using a statement, i.e. function, they both use the same syntax color from the storage.type scope.
Is the entity.name.type scope not defined for types?

Screenshots

Example code. Pasted the tokenColorCustomization from Settings.json in the same file for example purposes.
image

[string] type
image

function statement
image

Expected Behavior

In PowerShell ISE the statements uses the Keyword token with color '#00008b' and the types uses the Type token with color '#008080'. Is there another way to distinguish these scopes or tokens that I've missed or is the powershell.tmLanguage.json missing something?

Dominant language
PowerShell
Stars
151
Forks
55
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/EditorSyntax

All issues in PowerShell/EditorSyntax

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.