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

Use Vetur for Vue grammar #4014

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,6 @@
[submodule "vendor/grammars/atom-language-purescript"]
path = vendor/grammars/atom-language-purescript
url = https://github.com/purescript-contrib/atom-language-purescript
[submodule "vendor/grammars/vue-syntax-highlight"]
path = vendor/grammars/vue-syntax-highlight
url = https://github.com/vuejs/vue-syntax-highlight
[submodule "vendor/grammars/st2-zonefile"]
path = vendor/grammars/st2-zonefile
url = https://github.com/sixty4k/st2-zonefile
Expand Down Expand Up @@ -898,3 +895,6 @@
[submodule "vendor/grammars/atom-language-nextflow"]
path = vendor/grammars/atom-language-nextflow
url = https://github.com/nextflow-io/atom-language-nextflow
[submodule "vendor/grammars/vetur"]
path = vendor/grammars/vetur
url = https://github.com/vuejs/vetur
5 changes: 3 additions & 2 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,10 +726,11 @@ vendor/grammars/turtle.tmbundle:
- source.turtle
vendor/grammars/verilog.tmbundle:
- source.verilog
vendor/grammars/vetur:
- source.vue
- text.html.vue-html
vendor/grammars/vhdl:
- source.vhdl
vendor/grammars/vue-syntax-highlight:
- text.html.vue
vendor/grammars/wdl-sublime-syntax-highlighter:
- source.wdl
vendor/grammars/xc.tmbundle:
Expand Down
15 changes: 11 additions & 4 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,7 @@ Nextflow:
extensions:
- ".nf"
filenames:
- "nextflow.config"
- nextflow.config
interpreters:
- nextflow
language_id: 506780613
Expand Down Expand Up @@ -4188,7 +4188,7 @@ Scala:
color: "#c22d40"
extensions:
- ".scala"
- ".kojo"
- ".kojo"
- ".sbt"
- ".sc"
interpreters:
Expand Down Expand Up @@ -4856,13 +4856,20 @@ Volt:
codemirror_mime_type: text/x-d
language_id: 390
Vue:
type: markup
type: programming
color: "#2c3e50"
extensions:
- ".vue"
tm_scope: text.html.vue
tm_scope: source.vue
ace_mode: html
codemirror_mode: vue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1) Failure:
TestLanguage#test_codemirror_modes_present [/home/travis/build/github/linguist/test/test_language.rb:424]:
#<Linguist::Language name=Vue> missing CodeMirror MIME mode

... is happening because you're missing a codemirror_mime_type: <blah> entry right about here.

language_id: 391
Vue Template:
type: markup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is essentially HTML, it's probably a good idea to group it with HTML(add group: HTML to this section) like the many other HTML templating languages do.

tm_scope: text.html.vue-html
ace_mode: html
codemirror_mode: vue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need a codemirror_mime_type: <blah> here too.

language_id: 8536085
Wavefront Material:
type: data
extensions:
Expand Down
3 changes: 2 additions & 1 deletion vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **Vim script:** [Alhadis/language-viml](https://github.com/Alhadis/language-viml)
- **Visual Basic:** [angryant0007/VBDotNetSyntax](https://github.com/angryant0007/VBDotNetSyntax)
- **Volt:** [textmate/d.tmbundle](https://github.com/textmate/d.tmbundle)
- **Vue:** [vuejs/vue-syntax-highlight](https://github.com/vuejs/vue-syntax-highlight)
- **Vue:** [vuejs/vetur](https://github.com/vuejs/vetur)
- **Vue Template:** [vuejs/vetur](https://github.com/vuejs/vetur)
- **Wavefront Material:** [Alhadis/language-wavefront](https://github.com/Alhadis/language-wavefront)
- **Wavefront Object:** [Alhadis/language-wavefront](https://github.com/Alhadis/language-wavefront)
- **wdl:** [broadinstitute/wdl-sublime-syntax-highlighter](https://github.com/broadinstitute/wdl-sublime-syntax-highlighter)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/vetur
Submodule vetur added at f20968
1 change: 0 additions & 1 deletion vendor/grammars/vue-syntax-highlight
Submodule vue-syntax-highlight deleted from 5c2b5a