From 7b5d1c075d7539e8886df5b599edd434be26fa6a Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 21 Jul 2015 18:51:55 -0400 Subject: [PATCH] add syntax highlight for *.vue component files --- .gitmodules | 3 +++ grammars.yml | 2 ++ lib/linguist/languages.yml | 8 +++++++ samples/Vue/basic.vue | 21 +++++++++++++++++++ samples/Vue/pre-processors.vue | 31 ++++++++++++++++++++++++++++ vendor/grammars/vue-syntax-highlight | 1 + 6 files changed, 66 insertions(+) create mode 100644 samples/Vue/basic.vue create mode 100644 samples/Vue/pre-processors.vue create mode 160000 vendor/grammars/vue-syntax-highlight diff --git a/.gitmodules b/.gitmodules index dcd94622..7f02b603 100644 --- a/.gitmodules +++ b/.gitmodules @@ -665,3 +665,6 @@ [submodule "vendor/grammars/atom-language-purescript"] path = vendor/grammars/atom-language-purescript url = https://github.com/freebroccolo/atom-language-purescript +[submodule "vendor/grammars/vue-syntax-highlight"] + path = vendor/grammars/vue-syntax-highlight + url = https://github.com/vuejs/vue-syntax-highlight diff --git a/grammars.yml b/grammars.yml index d6d38438..a1bd7069 100644 --- a/grammars.yml +++ b/grammars.yml @@ -544,6 +544,8 @@ vendor/grammars/turtle.tmbundle: - source.turtle vendor/grammars/verilog.tmbundle: - source.verilog +vendor/grammars/vue-syntax-highlight: +- text.html.vue vendor/grammars/x86-assembly-textmate-bundle: - source.asm.x86 vendor/grammars/xc.tmbundle/: diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index a734d452..03874eaa 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3516,6 +3516,14 @@ Volt: tm_scope: source.d ace_mode: d +Vue: + type: markup + color: "#2c3e50" + extensions: + - .vue + tm_scope: text.html.vue + ace_mode: html + Web Ontology Language: type: markup color: "#9cc9dd" diff --git a/samples/Vue/basic.vue b/samples/Vue/basic.vue new file mode 100644 index 00000000..e5918fe7 --- /dev/null +++ b/samples/Vue/basic.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/samples/Vue/pre-processors.vue b/samples/Vue/pre-processors.vue new file mode 100644 index 00000000..364a1a1c --- /dev/null +++ b/samples/Vue/pre-processors.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/vendor/grammars/vue-syntax-highlight b/vendor/grammars/vue-syntax-highlight new file mode 160000 index 00000000..6cd3ee17 --- /dev/null +++ b/vendor/grammars/vue-syntax-highlight @@ -0,0 +1 @@ +Subproject commit 6cd3ee1743df0cc2d49d66c55437d535dadd579f