Replies: 1 comment
-
Just adding some more info, Queries: https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/vue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What problem does this feature solve?
TL;DR: New JavaScript features (e.g. the nullish coalescing operator
??
) break syntax highlighting in.vue
files on GitHub:Why?
GitHub uses the TextMate syntax definitions of this repository for its syntax highlighting of Vue SFC files (see: https://github.com/github-linguist/linguist/blob/main/vendor/README.md). Any TextMate-based syntax definition that injects JavaScript code will then use atom/language-javascript for its JavaScript highlighting. Unfortunately, this repository is unmaintained and was archived almost 3 years ago. Therefore, it will not support any new JavaScript language features.
→ All
.html
files on GitHub are already highlighted using Tree-sitter (see: https://github.com/github-linguist/linguist/blob/1b43482ac6ab97394a70946cb041f3fa5f3284b5/script/list-grammars#L18):Lengthy discussion on this topic, for reference:
What does the proposed solution look like?
Note
There are two unmaintained third-party repositories that have implemented a Tree-sitter syntax for Vue. They could be used for "inspiration" to create official tree-sitter syntax files:
Beta Was this translation helpful? Give feedback.
All reactions