aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-03-02 16:54:16 +0100
committerGitHub <noreply@github.com>2024-03-02 16:54:16 +0100
commitada920f2a43f87a26356d386cefe656bd6b3e9a8 (patch)
treee4ec8e2f35df74c1761e88de9fb5ffcc6c813f3b
parentUpdate parsers: vimdoc (diff)
downloadnvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar.gz
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar.bz2
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar.lz
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar.xz
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.tar.zst
nvim-treesitter-ada920f2a43f87a26356d386cefe656bd6b3e9a8.zip
feat(vue): switch to new parser (#6233)
* feat(vue): switch to new parser --------- Co-authored-by: Phạm Huy Hoàng <hoangtun0810@gmail.com>
-rw-r--r--lockfile.json2
-rw-r--r--lua/nvim-treesitter/parsers.lua3
-rw-r--r--queries/vue/highlights.scm32
3 files changed, 28 insertions, 9 deletions
diff --git a/lockfile.json b/lockfile.json
index b88cc25f4..41bbc7755 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -759,7 +759,7 @@
"revision": "016ad75faa854e4e13bc40c517015183b795eed9"
},
"vue": {
- "revision": "7e48557b903a9db9c38cea3b7839ef7e1f36c693"
+ "revision": "085e99bcc46b2e63ff06a830a31a55132ce95aa5"
},
"wgsl": {
"revision": "40259f3c77ea856841a4e0c4c807705f3e4a2b65"
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index 5333d19f1..a9beebaf3 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -2204,8 +2204,9 @@ list.vue = {
install_info = {
url = "https://github.com/tree-sitter-grammars/tree-sitter-vue",
files = { "src/parser.c", "src/scanner.c" },
+ branch = "main",
},
- maintainers = { "@WhyNotHugo" },
+ maintainers = { "@WhyNotHugo", "@lucario387" },
}
list.wgsl = {
diff --git a/queries/vue/highlights.scm b/queries/vue/highlights.scm
index 410dd0fff..64195c346 100644
--- a/queries/vue/highlights.scm
+++ b/queries/vue/highlights.scm
@@ -1,17 +1,38 @@
; inherits: html_tags
[
- (directive_dynamic_argument)
- (directive_dynamic_argument_value)
-] @tag
+ "["
+ "]"
+] @punctuation.bracket
(interpolation) @punctuation.special
(interpolation
(raw_text) @none)
+(dynamic_directive_inner_value) @variable
+
(directive_name) @tag.attribute
+; Accessing a component object's field
+(":"
+ .
+ (directive_value) @variable.member)
+
+("."
+ .
+ (directive_value) @property)
+
+; @click is like onclick for HTML
+("@"
+ .
+ (directive_value) @function.method)
+
+; Used in v-slot, declaring position the element should be put in
+("#"
+ .
+ (directive_value) @variable)
+
(directive_attribute
(quoted_attribute_value) @punctuation.special)
@@ -19,7 +40,4 @@
(quoted_attribute_value
(attribute_value) @none))
-[
- (directive_modifier)
- (directive_argument)
-] @function.method
+(directive_modifier) @function.method