Visitar URL original
No Syntax Highlighting for `enum` declarations · Issue #209 · PowerShell/EditorSyntax · GitHub
Skip to content

No Syntax Highlighting for enum declarations #209

Description

@rbuckton

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.

Summary

Syntax highlighting for enum declarations in VS Code is non-existent:

image

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.1.3
PSEdition                      Core
GitCommitId                    7.1.3
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}       
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.60.0-insider
49af1cbe00271ac2ea36cfc5f7352fe31a7b0094
x64

Extension Version

ms-vscode.powershell@2021.5.1
ms-vscode.powershell@2021.6.2
ms-vscode.powershell-preview@2021.8.0

Steps to Reproduce

Open any .ps1 or .psm1 file with an enum declaration.

Visuals

No response

Logs

No response

Activity

  1. andyleejordan commented on Aug 9, 2021

    @andyleejordan
    Member

    Hi,

    It appears that a long-standing issue in the PowerShell highlighting grammar is the cause of this.

    The extension's built-in (but experimental) semantic highlighting does support enum correctly. You can follow the instructions here to enable that, but it was disabled by default while its stability is improved.

    Thanks for the bug report. I'm going to transfer over to the relevant repo.

  2. andyleejordan commented on Aug 9, 2021

    @andyleejordan
    Member

    Duplicate of #29.

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