Skip to content

Discussion: Syntax Highlighting switch to TM grammars #981

Closed
@JustinGrote

Description

@JustinGrote

This would be a PSRL 3.0 type item, but I notice that PSReadline basically follows its own rules when it comes to syntax highlighting, and this leads to a lot of inconsistencies with theming, especially when used as, say, the integrated terminal in VSCode.

Would it make sense to adjust PSRL to use the textmate grammar shared by PSES and most other powershell editors for highlighting? https://github.com/PowerShell/EditorSyntax/blob/master/PowerShellSyntax.tmLanguage. It wouldn't have to implement a whole textmate library, just parse the tmLanguage file and use the regexes to define member, type, etc. and then have those items as PSReadLineOption exposed for color.

Then the PSReadline experience would be consistent with all editors using PSES or the tmlanguage highlighting.

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