Skip to content

VSCode: Highlight parameter placeholders in ScenarioOutline steps #50

@dotnetprofessional

Description

@dotnetprofessional

Problem

In a ScenarioOutline, step titles contain <parameter> placeholders that correspond to columns in the Examples table. These are not visually distinguished from the rest of the step text, making them harder to spot in code.

scenarioOutline(`Calculate shipping
    Examples:
    | country     | rate          |
    | Australia   | Domestic      |
    | New Zealand | International |
`, () => {
    given("the customer is from <country>", () => { });  // <country> not highlighted
    then("they are charged the <rate> shipping", () => { }); // <rate> not highlighted
});

Current State

The extension provides table header decorations (green styling) but has no TextMate grammar, semantic token provider, or decoration provider for <parameter> patterns in step text.

Proposal

Add a decoration provider that:

  1. Detects text matching <\w+> within step function calls (given, when, then, etc.)
  2. Applies a distinct visual style (e.g., bold, coloured, or italic) to make parameters stand out
  3. Works in both ScenarioOutline and RuleOutline contexts

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions