mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
feat(ziggy-schema): Add ziggy-schema parser and queries
Ziggy-schema is the schema definition file format for a ziggy file.
This commit is contained in:
parent
1a6fa428b8
commit
58c702c4d5
4 changed files with 53 additions and 0 deletions
|
|
@ -892,5 +892,8 @@
|
||||||
},
|
},
|
||||||
"ziggy": {
|
"ziggy": {
|
||||||
"revision": "c66f47bc632c66668d61fa06eda112b41d6e5130"
|
"revision": "c66f47bc632c66668d61fa06eda112b41d6e5130"
|
||||||
|
},
|
||||||
|
"ziggy_schema": {
|
||||||
|
"revision": "c66f47bc632c66668d61fa06eda112b41d6e5130"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2573,6 +2573,15 @@ list.ziggy = {
|
||||||
maintainers = { "@rockorager" },
|
maintainers = { "@rockorager" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.ziggy_schema = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/kristoff-it/ziggy",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
location = "tree-sitter-ziggy-schema",
|
||||||
|
},
|
||||||
|
maintainers = { "@rockorager" },
|
||||||
|
}
|
||||||
|
|
||||||
list.templ = {
|
list.templ = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/vrischmann/tree-sitter-templ",
|
url = "https://github.com/vrischmann/tree-sitter-templ",
|
||||||
|
|
|
||||||
38
queries/ziggy_schema/highlights.scm
Normal file
38
queries/ziggy_schema/highlights.scm
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
(struct_field
|
||||||
|
key: (_) @keyword)
|
||||||
|
|
||||||
|
(tag_name) @function
|
||||||
|
|
||||||
|
[
|
||||||
|
"unknown"
|
||||||
|
"any"
|
||||||
|
"struct"
|
||||||
|
"root"
|
||||||
|
"enum"
|
||||||
|
"map"
|
||||||
|
] @keyword
|
||||||
|
|
||||||
|
(identifier) @type
|
||||||
|
|
||||||
|
"?" @type
|
||||||
|
|
||||||
|
[
|
||||||
|
"bool"
|
||||||
|
"bytes"
|
||||||
|
"int"
|
||||||
|
"float"
|
||||||
|
] @constant.builtin
|
||||||
|
|
||||||
|
(doc_comment) @comment.documentation
|
||||||
|
|
||||||
|
[
|
||||||
|
","
|
||||||
|
"|"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
|
[
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
|
"{"
|
||||||
|
"}"
|
||||||
|
] @punctuation.bracket
|
||||||
3
queries/ziggy_schema/indents.scm
Normal file
3
queries/ziggy_schema/indents.scm
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
(struct) @indent.begin
|
||||||
|
|
||||||
|
"}" @indent.end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue