PowerShell / EditorSyntax

PowerShell syntax highlighting for editors (VS Code, Atom, SublimeText, TextMate, etc.) and GitHub!
MIT License
133 stars 45 forks source link

capture numerics #77

Closed omniomi closed 6 years ago

omniomi commented 6 years ago

Using the following in a .tmTheme file:

<dict>
    <key>name</key>
    <string>Number</string>
    <key>scope</key>
    <string>constant.numeric</string>
    <key>settings</key>
    <dict>
        <key>fontStyle</key>
        <string></string>
        <key>foreground</key>
        <string>#F00</string>
    </dict>
</dict>

to make numerics bright red for testing. The result is this:

numeric-before

because they're being coloured by the keyword scope.

I am proposing something closer to how it's handled in the C# language syntax file which more accurately represents numerics and allows theming within the constant.numeric scope.

numeric-after

omniomi commented 6 years ago

Fixed negative / positive markers:

numerics-fixed

omniomi commented 6 years ago

@tylerl0706, sounds good. Last night I setup a src clone of VS Code that is pulling syntax directly from my repo for testing. Will also write a tool that I'll submit to the repo to make it easier to test without building VS Code from source.

TylerLeonhardt commented 6 years ago

That'd be awesome 👍 making it easy to test and contribute is so good