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 highlighting inside multi line string #1726

Closed
sebader opened this issue Mar 4, 2021 · 5 comments
Closed

Syntax highlighting inside multi line string #1726

sebader opened this issue Mar 4, 2021 · 5 comments

Comments

@sebader
Copy link
Member

sebader commented Mar 4, 2021

Is your feature request related to a problem? Please describe.
I don't know if this is even technically possible, but it would be awesome if inside a multi line string we could get at least basic syntax highlighting. Maybe only for the most common use cases like JSON, YAML, XML. You could even have the user state which language it is like

var myXml = '''xml
<hello>
   world
</hello>'''

Currently it this beautiful big (in my case) brown blob ;)
image

Describe the solution you'd like
Have it light up nicely
image

@sebader sebader added the enhancement New feature or request label Mar 4, 2021
@ghost ghost added the Needs: Triage 🔍 label Mar 4, 2021
@anthony-c-martin
Copy link
Member

I had a feeling this would come up 😄

@sebader
Copy link
Member Author

sebader commented Mar 4, 2021

;) And I left out the part that I want interpolation but I think the example speaks for itself :P

@anthony-c-martin
Copy link
Member

My personal opinion: We do have some options for supporting this, but it feels like if we're starting to inline complex snippets from other languages, we should instead look to supporting this through includeFile() (#471), so that real language validation can occur on top of just syntax highlighting, and we're less limited in terms of escaping.

@JustinGrote
Copy link

+1 for complex things being done in includeFile(), then you can open that file and use the actual language server of that file rather than some shimmed-in syntax highlighting.

@StephenWeatherford
Copy link
Contributor

+1 agree with @anthony-c-martin, I suggest we close this.

@alex-frankel alex-frankel added won't fix and removed enhancement New feature or request Needs: Triage 🔍 labels Jun 1, 2022
@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants