mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
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:
parent
9dca0a176d
commit
16af5ef490
6 changed files with 65 additions and 0 deletions
|
|
@ -638,6 +638,9 @@
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"revision": "d847898fec3fe596798c9fda55cb8c05a799001a"
|
"revision": "d847898fec3fe596798c9fda55cb8c05a799001a"
|
||||||
},
|
},
|
||||||
|
"typoscript": {
|
||||||
|
"revision": "43b221c0b76e77244efdaa9963e402a17c930fbc"
|
||||||
|
},
|
||||||
"ungrammar": {
|
"ungrammar": {
|
||||||
"revision": "debd26fed283d80456ebafa33a06957b0c52e451"
|
"revision": "debd26fed283d80456ebafa33a06957b0c52e451"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1874,6 +1874,14 @@ list.typescript = {
|
||||||
maintainers = { "@steelsojka" },
|
maintainers = { "@steelsojka" },
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list.typoscript = {
|
||||||
|
install_info = {
|
||||||
|
url = "https://github.com/Teddytrombone/tree-sitter-typoscript",
|
||||||
|
files = { "src/parser.c" },
|
||||||
|
},
|
||||||
|
maintainers = { "@Teddytrombone" },
|
||||||
|
}
|
||||||
|
|
||||||
list.ungrammar = {
|
list.ungrammar = {
|
||||||
install_info = {
|
install_info = {
|
||||||
url = "https://github.com/Philipp-M/tree-sitter-ungrammar",
|
url = "https://github.com/Philipp-M/tree-sitter-ungrammar",
|
||||||
|
|
|
||||||
1
queries/typoscript/folds.scm
Normal file
1
queries/typoscript/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(block) @fold
|
||||||
46
queries/typoscript/highlights.scm
Normal file
46
queries/typoscript/highlights.scm
Normal 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
|
||||||
5
queries/typoscript/indents.scm
Normal file
5
queries/typoscript/indents.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
(block) @indent.begin
|
||||||
|
|
||||||
|
"}" @indent.branch @indent.end
|
||||||
|
|
||||||
|
(comment) @indent.ignore
|
||||||
2
queries/typoscript/injections.scm
Normal file
2
queries/typoscript/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
Loading…
Add table
Add a link
Reference in a new issue