Skip to content

Conversation

@nikitaourazbaev
Copy link

Adds basic support for LiquidDoc and the {% doc %} / {% enddoc %} tags.

https://shopify.dev/docs/storefronts/themes/tools/liquid-doc
https://shopify.dev/docs/api/liquid/tags/theme-tags#doc

I’m not too attached to any of the scope names, feel free to change them if there are more suitable ones available that I’m not aware of.

The official VS Code extension treats everything that follows @example as Liquid HTML. I opted for a simpler implementation where it’s not highlighted and remains a comment, primarily because I’m not sure what should terminate the @example Liquid HTML scope as there’s no end keyword, but also because I’m wary of performance implications of embedding Liquid HTML inside a syntax that’s embedded in Liquid HTML.

@nikitaourazbaev nikitaourazbaev marked this pull request as draft May 28, 2025 19:51
@nikitaourazbaev
Copy link
Author

Hmm, converting to draft while I debug the test.

@nikitaourazbaev nikitaourazbaev marked this pull request as ready for review May 28, 2025 20:00
@nikitaourazbaev
Copy link
Author

Ok, I‘m no longer getting errors on the CI Syntax tests for 4134, but it’s not green either.

Open to any feedback for how I can test this better. I tried running local tests with https://github.com/SublimeText/UnitTesting but am getting a lot of errors in rules I did not edit (possibly false positives?).

@deathaxe
Copy link
Member

deathaxe commented May 29, 2025

Those tests fail due to various structural changes of core syntaxes, this branch is no longer compatible with. This branch just contains common changes, which is valid for all three maintained release branches to avoid duplicate commits/changes needed to be made in each of them individually.

Only those release branches contain ST version specific commits needed to maintain compatibility.

I've removed tests against "latest" ST versions in develop branch to help future tests to succeed.


With regards to LiquidDoc, do we really need an external syntax definition? Wouldn't it be sufficient to implement them as normal contexts within Liquid?


I'll look into it.

@deathaxe deathaxe merged commit 3dc4b20 into SublimeText:develop May 29, 2025
1 check passed
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.

2 participants