mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -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
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