Skip to content

Enumeration support #29

Description

@daviwil

From Sami Koskivaara (@Satak) on November 24, 2015 7:49

The whole enumeration / enum keyword feels like it's not implemented to have a support for it. Doesn't highlight the keyword or it's content and doesn't offer any snippets.

Copied from original issue: PowerShell/vscode-powershell#26

Activity

  1. daviwil commented on Dec 19, 2016

    @daviwil
    ContributorAuthor

    From Sami Koskivaara (@Satak) on November 24, 2015 17:52

    You can see that enum keyword, the name or it's content is not color coded
    image

  2. daviwil commented on Dec 19, 2016

    @daviwil
    ContributorAuthor

    This seems to be a problem with the TextMate bundle we're using from Sublime Text. GitHub also uses it, this is how the same code gets highlighted here:

    enum test
    {
        listItem1
        listItem2
        listItem3
    }

    Looks like there's already a bug filed against the Sublime Text repo for this:

    SublimeText/PowerShell#124

    Joel Bennett (@Jaykul), any interest in trying to fix that one?

  3. daviwil commented on Dec 19, 2016

    @daviwil
    ContributorAuthor

    From Adam Bertram (@adbertram) on December 14, 2016 16:30

    I just ran into this today as well. It would be nice to at least get syntax coloring for enums.

  4. daviwil commented on Dec 19, 2016

    @daviwil
    ContributorAuthor

    From Keith Hill (@rkeithhill) on December 19, 2016 0:51

    Shouldn't this be moved to http://github.com/powershell/editorsyntax and closed here?

  5. daviwil commented on Dec 19, 2016

    @daviwil
    ContributorAuthor

    Yep!

  6. kborowinski commented on May 7, 2018

    @kborowinski
    Contributor

    Nick James (@omniomi) Could you have a look at enumerator coloring in spare time? (#29)

  7. JosKrause commented on Aug 18, 2019

    @JosKrause

    Any update on this, we're 3 years later now #curious

  8. msftrncs commented on Aug 19, 2019

    @msftrncs
    Contributor

    Jos Krause (@JosKrause), have you a chance to look at PR #155? In that PR I have a more complete class and enum scoping. I could probably try to separate that out to a new PR. If you have a chance, also look at PR #156, it demonstrates a more elaborate statement syntax based scoping.

  9. edhaack commented on Mar 25, 2020

    @edhaack

    Sure would be nice to treat "enum" as a real thing... finally.

  10. Satak commented on Mar 25, 2020

    @Satak

    Soon this turns 5 years 😁

    Good things come to those who wait

  11. Satak commented on Jul 31, 2020

    @Satak
  12. brandonavant commented on Aug 12, 2022

    @brandonavant

    Looks like there's still no fix for this, 6 years later...

  13. o-l-a-v commented on Mar 7, 2026

    @o-l-a-v
    Contributor

    Semantic highlighting in VSCode with vscode-powershell does highlight enums.

    VSCode settings.json:

    {
      "[powershell]": {
        "editor.semanticHighlighting.enabled": true
      }
    }
    Image

    But it has other issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions