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

Revert "Change grammar source for Svelte" #6184

Merged
merged 1 commit into from
Nov 28, 2022

Conversation

lildude
Copy link
Member

@lildude lildude commented Nov 24, 2022

Reverts #5963

This broke the syntax highlighting between <(script|style|template)> tags due to a really old limitation in the old prettylights highlighting engine which won't be fixed.

See #6164 for more details.

This can be reverted back to the sveltejs/svelte-atom grammar once it has been updated to address this limitation or a production-ready tree-sitter grammar becomes available.

This PR will be merged early next week (w/c 28 Nov 2022) and a patch release made, unless the sveltejs/svelte-atom grammar is updated by then, in which case I'll pull the latest version of that grammar.

Fixes #6180

@lildude lildude requested a review from a team as a code owner November 24, 2022 11:05
@Alhadis
Copy link
Collaborator

Alhadis commented Nov 24, 2022

due to a really old limitation in the old prettylights highlighting engine

Could you elaborate on the specifics of said limitation? This is relevant because I still use Atom for writing, previewing and testing grammars, and I need to know of any discrepancies between it and GitHub/PrettyLights.

@lildude
Copy link
Member Author

lildude commented Nov 24, 2022

See #6164 (comment)

@Alhadis
Copy link
Collaborator

Alhadis commented Nov 24, 2022

The problem is it doesn't expand scope matches and instead treats the $1 in places like this literally:

Oh, that. I always assumed that was an intentional optimisation due to the rarity of meaningful scopes getting captured by a grammar. It's bitten me several times when abusing injections (most recently in language-mermaid).

(Sorry for the noise…)

@lildude
Copy link
Member Author

lildude commented Nov 24, 2022

Oh, that. I always assumed that was an intentional optimisation due to the rarity of meaningful scopes getting captured by a grammar.

It's certainly possible. I can't find any explanation of why this wasn't implemented other than a "Expand?" comment in the code and the author left GitHub a long time ago - I doubt they could remember why they wrote that over 8 years ago too 😁.

@lildude
Copy link
Member Author

lildude commented Nov 28, 2022

No updates have been made to the sveltejs/svelte-atom grammar so I'm going to go ahead and merge this.

@lildude lildude merged commit 9fcffab into master Nov 28, 2022
@lildude lildude deleted the revert-5963-svelte-official branch November 28, 2022 09:40
milosz1092 referenced this pull request in milosz1092/steg-bitmap Nov 28, 2022
@github-linguist github-linguist locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Svelte highlighting seems to be not working
2 participants