Skip to content

First characters seem to be their own tokens #44

@martpie

Description

@martpie

Please pardon my ignorance, I'm very new to Textmate grammars.

I am working on a VS Code extension to highlight certains keys in YAML file to improve the DevX when dealing with Hydra config files (that are pure YAMLs).

While trying to select some keys, I realized the first character of each token seem to be its own token?

Example with:

array:
  - _target_: what
Screenshot 2023-10-03 at 14 17 39 Screenshot 2023-10-03 at 14 17 35 Screenshot 2023-10-03 at 14 17 44 Screenshot 2023-10-03 at 14 17 48

Notice how _ and target_ are different tokens, and how w and hat are different tokens. In this case, that make it quite hard to select _target_ as a key to apply to it a custom style.

Is that intentional? Is that some obscure part of the YAML spec I am not aware about?

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