Piotr/z 651 vue support (#3123)
Release Notes: - Added Vue language support.
This commit is contained in:
parent
16d9d77d88
commit
bfbe4ae4b4
12 changed files with 286 additions and 18 deletions
2
crates/zed/src/languages/vue/brackets.scm
Normal file
2
crates/zed/src/languages/vue/brackets.scm
Normal file
|
@ -0,0 +1,2 @@
|
|||
("<" @open ">" @close)
|
||||
("\"" @open "\"" @close)
|
14
crates/zed/src/languages/vue/config.toml
Normal file
14
crates/zed/src/languages/vue/config.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
name = "Vue.js"
|
||||
path_suffixes = ["vue"]
|
||||
block_comment = ["<!-- ", " -->"]
|
||||
autoclose_before = ";:.,=}])>"
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "(", end = ")", close = true, newline = true },
|
||||
{ start = "<", end = ">", close = true, newline = true, not_in = ["string", "comment"] },
|
||||
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
|
||||
{ start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
|
||||
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
|
||||
]
|
||||
word_characters = ["-"]
|
15
crates/zed/src/languages/vue/highlights.scm
Normal file
15
crates/zed/src/languages/vue/highlights.scm
Normal file
|
@ -0,0 +1,15 @@
|
|||
(attribute) @property
|
||||
(directive_attribute) @property
|
||||
(quoted_attribute_value) @string
|
||||
(interpolation) @punctuation.special
|
||||
(raw_text) @embedded
|
||||
|
||||
((tag_name) @type
|
||||
(#match? @type "^[A-Z]"))
|
||||
|
||||
((directive_name) @keyword
|
||||
(#match? @keyword "^v-"))
|
||||
|
||||
(start_tag) @tag
|
||||
(end_tag) @tag
|
||||
(self_closing_tag) @tag
|
7
crates/zed/src/languages/vue/injections.scm
Normal file
7
crates/zed/src/languages/vue/injections.scm
Normal file
|
@ -0,0 +1,7 @@
|
|||
(script_element
|
||||
(raw_text) @content
|
||||
(#set! "language" "javascript"))
|
||||
|
||||
(style_element
|
||||
(raw_text) @content
|
||||
(#set! "language" "css"))
|
Loading…
Add table
Add a link
Reference in a new issue