diff options
| author | Teddytrombone <github@tmk-stgeorgen.at> | 2023-10-24 09:48:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-24 07:48:33 +0000 |
| commit | 16af5ef490ff37407cc4241d7b8b8798d5b3a726 (patch) | |
| tree | 76a164dc751f46e5f5cb38a724ce55957b5786e2 /queries/typoscript | |
| parent | Update parsers: liquidsoap, wing (#5568) (diff) | |
| download | nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar.gz nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar.bz2 nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar.lz nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar.xz nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.tar.zst nvim-treesitter-16af5ef490ff37407cc4241d7b8b8798d5b3a726.zip | |
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>
Diffstat (limited to 'queries/typoscript')
| -rw-r--r-- | queries/typoscript/folds.scm | 1 | ||||
| -rw-r--r-- | queries/typoscript/highlights.scm | 46 | ||||
| -rw-r--r-- | queries/typoscript/indents.scm | 5 | ||||
| -rw-r--r-- | queries/typoscript/injections.scm | 2 |
4 files changed, 54 insertions, 0 deletions
diff --git a/queries/typoscript/folds.scm b/queries/typoscript/folds.scm new file mode 100644 index 000000000..fd7d23999 --- /dev/null +++ b/queries/typoscript/folds.scm @@ -0,0 +1 @@ +(block) @fold diff --git a/queries/typoscript/highlights.scm b/queries/typoscript/highlights.scm new file mode 100644 index 000000000..9ce80c680 --- /dev/null +++ b/queries/typoscript/highlights.scm @@ -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 diff --git a/queries/typoscript/indents.scm b/queries/typoscript/indents.scm new file mode 100644 index 000000000..f3d15b720 --- /dev/null +++ b/queries/typoscript/indents.scm @@ -0,0 +1,5 @@ +(block) @indent.begin + +"}" @indent.branch @indent.end + +(comment) @indent.ignore diff --git a/queries/typoscript/injections.scm b/queries/typoscript/injections.scm new file mode 100644 index 000000000..6adae45a2 --- /dev/null +++ b/queries/typoscript/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
