Add Vue tree sitter grammar (#787)

*  Add vue tree sitter support

* Update .gitmodules

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
pull/826/head
Thomas Wehmöller 3 years ago committed by GitHub
parent 4260b31ec0
commit a7f49fa56f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

4
.gitmodules vendored

@ -122,3 +122,7 @@
path = helix-syntax/languages/tree-sitter-svelte
url = https://github.com/Himujjal/tree-sitter-svelte
shallow = true
[submodule "helix-syntax/languages/tree-sitter-vue"]
path = helix-syntax/languages/tree-sitter-vue
url = https://github.com/ikatyang/tree-sitter-vue
shallow = true

@ -0,0 +1 @@
Subproject commit 91fe2754796cd8fba5f229505a23fa08f3546c06

@ -278,6 +278,15 @@ roots = []
indent = { tab-width = 2, unit = " " }
language-server = { command = "svelteserver", args = ["--stdio"] }
[[language]]
name = "vue"
scope = "source.vue"
injection-regex = "vue"
file-types = ["vue"]
roots = []
indent = { tab-width = 2, unit = " " }
[[language]]
name = "yaml"
scope = "source.yaml"

@ -0,0 +1,21 @@
(tag_name) @tag
(end_tag) @tag
(directive_name) @keyword
(directive_argument) @constant
(attribute
(attribute_name) @attribute
(quoted_attribute_value
(attribute_value) @string)
)
(comment) @comment
[
"<"
">"
"</"
"{{"
"}}"
] @punctuation.bracket

@ -0,0 +1,17 @@
(directive_attribute
(directive_name) @keyword
(quoted_attribute_value
(attribute_value) @injection.content)
(#set! injection.language "javascript"))
((interpolation
(raw_text) @injection.content)
(#set! injection.language "javascript"))
((script_element
(raw_text) @injection.content)
(#set! injection.language "javascript"))
((style_element
(raw_text) @injection.content)
(#set! injection.language "css"))
Loading…
Cancel
Save