Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First characters seem to be their own tokens #44

Open
Tracked by #1
martpie opened this issue Oct 3, 2023 · 2 comments
Open
Tracked by #1

First characters seem to be their own tokens #44

martpie opened this issue Oct 3, 2023 · 2 comments

Comments

@martpie
Copy link

martpie commented Oct 3, 2023

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?

@martpie
Copy link
Author

martpie commented Feb 5, 2024

Poke :)

@Cthuflu
Copy link

Cthuflu commented Mar 26, 2024

Cross referencing that this had been submitted directly for vscode as well: microsoft/vscode#180523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants