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

Color escape codes in strings #6712

Closed
antoyo opened this issue Apr 11, 2023 · 2 comments · Fixed by #6724
Closed

Color escape codes in strings #6712

antoyo opened this issue Apr 11, 2023 · 2 comments · Fixed by #6724
Assignees
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@antoyo
Copy link
Contributor

antoyo commented Apr 11, 2023

Hi.
It would be convenient to color escape characters like \n in strings.
It seems it's already colored for some languages (like Rust), but not others (like C++).
Thanks.

@antoyo antoyo added the C-enhancement Category: Improvements label Apr 11, 2023
@the-mikedavis
Copy link
Member

That comes from this stanza in the rust highlights:

(escape_sequence) @constant.character.escape

The C/C++ tree-sitter grammars parse the same escape_sequence rule, so it should work to add that same stanza to runtime/queries/c/highlights.scm for both C and C++

@the-mikedavis the-mikedavis added E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors A-language-support Area: Support for programming/text languages labels Apr 11, 2023
@LowLevelLover
Copy link
Contributor

Hey @the-mikedavis,

Could you assign this issue to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants