feat(typoscript) Added parser and queries for TypoScript (#5564)

* Added configuration for TypoScript

* Removed duplicated code; Applied folding suggestion

* Applied suggestions

* Update queries/typoscript/highlights.scm

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>

---------

Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
This commit is contained in:
Teddytrombone 2023-10-24 09:48:33 +02:00 committed by GitHub
parent 9dca0a176d
commit 16af5ef490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 65 additions and 0 deletions

View file

@ -638,6 +638,9 @@
"typescript": {
"revision": "d847898fec3fe596798c9fda55cb8c05a799001a"
},
"typoscript": {
"revision": "43b221c0b76e77244efdaa9963e402a17c930fbc"
},
"ungrammar": {
"revision": "debd26fed283d80456ebafa33a06957b0c52e451"
},

View file

@ -1874,6 +1874,14 @@ list.typescript = {
maintainers = { "@steelsojka" },
}
list.typoscript = {
install_info = {
url = "https://github.com/Teddytrombone/tree-sitter-typoscript",
files = { "src/parser.c" },
},
maintainers = { "@Teddytrombone" },
}
list.ungrammar = {
install_info = {
url = "https://github.com/Philipp-M/tree-sitter-ungrammar",

View file

@ -0,0 +1 @@
(block) @fold

View file

@ -0,0 +1,46 @@
(identifier) @field
(constant) @constant
(modifier_function) @function
(modifier_predefined) @function.builtin
[
(condition)
(condition_end)
(condition_else)
] @conditional
(cobject) @type.builtin
[
"@import"
"INCLUDE_TYPOSCRIPT"
] @include
[
(comment)
(single_line_comment)
] @comment @spell
[
(string)
(multiline_value)
] @string
[
"="
">"
"<"
":="
"=<"
(condition_bool)
] @operator
"," @punctuation.delimiter
[
"("
")"
(block_punctuation)
] @punctuation.bracket

View file

@ -0,0 +1,5 @@
(block) @indent.begin
"}" @indent.branch @indent.end
(comment) @indent.ignore

View file

@ -0,0 +1,2 @@
((comment) @injection.content
(#set! injection.language "comment"))