mirror of
https://github.com/helix-editor/helix
synced 2024-11-10 10:34:45 +01:00
Add Vue tree sitter grammar (#787)
* ✨ Add vue tree sitter support
* Update .gitmodules
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
This commit is contained in:
parent
4260b31ec0
commit
a7f49fa56f
4
.gitmodules
vendored
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
|
||||
|
1
helix-syntax/languages/tree-sitter-vue
Submodule
1
helix-syntax/languages/tree-sitter-vue
Submodule
@ -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"
|
||||
|
21
runtime/queries/vue/highlights.scm
Normal file
21
runtime/queries/vue/highlights.scm
Normal file
@ -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
|
17
runtime/queries/vue/injections.scm
Normal file
17
runtime/queries/vue/injections.scm
Normal file
@ -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…
Reference in New Issue
Block a user