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

Syntax: Fix missing meta.string.yaml scope #375

Conversation

jfcherng
Copy link
Contributor

No description provided.

@FichteFoll
Copy link
Member

That was actually done on purpose back then because it would colorize, well, everything as string and would reduce the color spectrum for the embedded regular expressions. For consistency, the same would have to be applied to the unquoted strings, too.
Perhaps a meta.string scope would be an alternative?

@jfcherng
Copy link
Contributor Author

Interesting. So I guess it's designed that double quotes are highlighted as plain string, correct?

@jfcherng jfcherng force-pushed the fix/st-syntax-single-quote branch from c996780 to 9f1d411 Compare May 31, 2022 01:09
@FichteFoll
Copy link
Member

FichteFoll commented May 31, 2022

Interesting. So I guess it's designed that double quotes are highlighted as plain string, correct?

It's more of me being lazy and not wanting to do yet another version of doubly-escaped regular expression shenanigans as with JSON-tmLanguage before. Double-quoted strings in YAML bring absolutely no advantage for syntax definitions outside of very small and almost plain-text matches beginning with a ' character (so matching single-quoted strings, basically), in which case rich regex matching is just not needed. So yes, one part is laziness and the other is discouraging users from doing it the wrong way.

@jfcherng jfcherng changed the title Syntax: Fix missing string.quoted.single.yaml scope Syntax: Fix missing meta.string.yaml scope Jun 1, 2022
@FichteFoll FichteFoll added this to the 3.4.1 milestone Sep 2, 2022
@FichteFoll FichteFoll closed this in f787e91 Sep 2, 2022
@jfcherng jfcherng deleted the fix/st-syntax-single-quote branch September 2, 2022 20:37
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

Successfully merging this pull request may close these issues.

3 participants