Fix embedded languages not displaying correctly - #99
Merged
Conversation
nefrob
self-requested a review
March 18, 2026 14:40
nefrob
approved these changes
Mar 20, 2026
nefrob
left a comment
Owner
There was a problem hiding this comment.
This is awesome! Thanks for digging into this long standing setup issue. Snaps look good.
nefrob
reviewed
Mar 20, 2026
Contributor
Author
|
Done |
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
If you have embedded languages in the grammar you're providing, you need to provide an "embeddedLanguages" parameter in the "grammars" object with
"<tm_id>": "<LANG>"; otherwise they won't display correctly in vscode.Additionally, there were errors in the bounds-checking of
embedded-languagein the tmLanguage. If a subsequent recipe had any deps or params in the specifier, theendcheck would fail and the syntax coloring would bleed into the subsequent lins. I updated the tmLanguage to properly mark the "end" bound.Finally, I updated the tests to correctly embed the embedded grammars in the snapshots. Please note: there were a bunch of tmLanguage files added in
syntaxes/test-grammarsto accomodate testing; this is only for testing, these are NOT used when the extension is running.Testing/Screenshots:
Before:

After:
