diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /queries/tera | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'queries/tera')
| -rw-r--r-- | queries/tera/highlights.scm | 153 | ||||
| -rw-r--r-- | queries/tera/injections.scm | 7 |
2 files changed, 0 insertions, 160 deletions
diff --git a/queries/tera/highlights.scm b/queries/tera/highlights.scm deleted file mode 100644 index f41ad826f..000000000 --- a/queries/tera/highlights.scm +++ /dev/null @@ -1,153 +0,0 @@ -; Variables -;---------- -(identifier) @variable - -((identifier) @variable.builtin - (#any-of? @variable.builtin "loop" "__tera_context")) - -; Properties -;----------- -(member_expression - property: (identifier)? @variable.member) - -; Literals -;----------- -(string) @string - -(bool) @boolean - -(number) @number - -; Tokens -;----------- -[ - "." - "," - "::" - (frontmatter_delimiter) -] @punctuation.delimiter - -[ - "*" - "/" - "%" - "|" - "+" - "-" - "~" - "=" - "==" - "!=" - "<" - ">" - "<=" - ">=" -] @operator - -[ - "(" - ")" - "[" - "]" - "{%" - "%}" - "-%}" - "{%-" - "}}" - "{{" - "-}}" - "{{-" -] @punctuation.bracket - -; Tags -;----------- -(comment_tag) @comment @spell - -; Keywords -;----------- -[ - "if" - "elif" - "else" - "endif" -] @keyword.conditional - -[ - "for" - "endfor" -] @keyword.repeat - -[ - "include" - "import" - "extends" -] @keyword.import - -[ - "in" - "and" - "or" - "not" - "is" -] @keyword.operator - -[ - "break" - "continue" -] @keyword.return - -[ - "set" - "set_global" - "filter" - "endfilter" - "block" - "endblock" - "macro" - "endmacro" - "raw" - "endraw" - "as" -] @keyword - -; Functions -;----------- -(macro_statement - name: (identifier) @function - (parameter_list - parameter: (identifier) @variable.parameter - (optional_parameter - name: (identifier) @variable.parameter))) - -(call_expression - scope: (identifier)? @module - name: (identifier) @function.call) - -(call_expression - scope: (identifier) @module.builtin - name: (identifier) @function.call - (#eq? @module.builtin "self")) - -(call_expression - name: (identifier) @function.builtin - (#any-of? @function.builtin - ; Functions - https://keats.github.io/tera/docs/#built-in-functions - "range" "now" "throw" "get_random" "get_env")) - -(test_expression - test: (identifier) @function.call) - -(test_expression - test: (identifier) @function.builtin - (#any-of? @function.builtin - ; Tests - https://keats.github.io/tera/docs/#built-in-tests - "defined" "undefined" "odd" "even" "string" "number" "divisibleby" "iterable" "object" - "starting_with" "ending_with" "containing" "matching")) - -(filter_expression - filter: (identifier) @function.method.call) - -; Namespaces -;----------- -(import_statement - scope: (identifier) @module) diff --git a/queries/tera/injections.scm b/queries/tera/injections.scm deleted file mode 100644 index 394142081..000000000 --- a/queries/tera/injections.scm +++ /dev/null @@ -1,7 +0,0 @@ -(frontmatter - (content) @injection.content - (#set! injection.language "yaml") - (#set! injection.combined)) - -((comment_tag) @injection.content - (#set! injection.language "comment")) |
