feat(vue): update Vue grammar #5
Merged
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.
We've had some reports by the Nuxt team and a few users that our Vue syntax highlighting fails at times. We have not been able to replicate the issue, but for the Nuxt team report at least it seemed linked to a couple things:
vue.tmLanguagefile (XML) failed to parse correctly.It's likely that this might be a glitch in how that file was served sometime around August and then cached by the user's service worker, and not necessarily a syntax issue in the file itself. So any update that increments the
@blitz/textmateversion that we use in URLs when fetching grammars would invalide the service worker cache and probably resolve this issue.But I’m also a bit wary of using the XML PLIST format, because it seems a bit more prone to parse errors by our TextMate grammar implementation than JSON.
And the
vue.tmLanguagefile we're using currently is 2 years old, so I suspect it might be missing support for a few Vue template syntax features by now.For all those reasons, I propose updating our Vue language syntax to a recent
vue.tmLanguage.jsonsourced from https://github.com/vuejs/language-tools/blob/master/extensions/vscode/syntaxes/vue.tmLanguage.json