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/jq | |
| 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/jq')
| -rw-r--r-- | queries/jq/highlights.scm | 158 | ||||
| -rw-r--r-- | queries/jq/injections.scm | 23 | ||||
| -rw-r--r-- | queries/jq/locals.scm | 10 |
3 files changed, 0 insertions, 191 deletions
diff --git a/queries/jq/highlights.scm b/queries/jq/highlights.scm deleted file mode 100644 index 5d6050f4c..000000000 --- a/queries/jq/highlights.scm +++ /dev/null @@ -1,158 +0,0 @@ -; Variables -(variable) @variable - -((variable) @constant.builtin - (#eq? @constant.builtin "$ENV")) - -((variable) @constant.macro - (#eq? @constant.macro "$__loc__")) - -; Properties -(index - (identifier) @property) - -; Labels -(query - label: (variable) @label) - -(query - break_statement: (variable) @label) - -; Literals -(number) @number - -(string) @string - -[ - "true" - "false" -] @boolean - -"null" @type.builtin - -; Interpolation -[ - "\\(" - ")" -] @character.special - -; Format -(format) @attribute - -; Functions -(funcdef - (identifier) @function) - -(funcdefargs - (identifier) @variable.parameter) - -[ - "reduce" - "foreach" -] @function.builtin - -((funcname) @function.call - . - "(") - -; jq -n 'builtins | map(split("/")[0]) | unique | .[]' -((funcname) @function.builtin - (#any-of? @function.builtin - "IN" "INDEX" "JOIN" "abs" "acos" "acosh" "add" "all" "any" "arrays" "ascii_downcase" - "ascii_upcase" "asin" "asinh" "atan" "atan2" "atanh" "booleans" "bsearch" "builtins" "capture" - "cbrt" "ceil" "combinations" "contains" "copysign" "cos" "cosh" "debug" "del" "delpaths" "drem" - "empty" "endswith" "env" "erf" "erfc" "error" "exp" "exp10" "exp2" "explode" "expm1" "fabs" - "fdim" "finites" "first" "flatten" "floor" "fma" "fmax" "fmin" "fmod" "format" "frexp" - "from_entries" "fromdate" "fromdateiso8601" "fromjson" "fromstream" "gamma" "get_jq_origin" - "get_prog_origin" "get_search_list" "getpath" "gmtime" "group_by" "gsub" "halt" "halt_error" - "has" "hypot" "implode" "in" "index" "indices" "infinite" "input" "input_filename" - "input_line_number" "inputs" "inside" "isempty" "isfinite" "isinfinite" "isnan" "isnormal" - "iterables" "j0" "j1" "jn" "join" "keys" "keys_unsorted" "last" "ldexp" "length" "lgamma" - "lgamma_r" "limit" "localtime" "log" "log10" "log1p" "log2" "logb" "ltrimstr" "map" "map_values" - "match" "max" "max_by" "min" "min_by" "mktime" "modf" "modulemeta" "nan" "nearbyint" "nextafter" - "nexttoward" "normals" "not" "now" "nth" "nulls" "numbers" "objects" "path" "paths" "pick" "pow" - "pow10" "range" "recurse" "remainder" "repeat" "reverse" "rindex" "rint" "round" "rtrimstr" - "scalars" "scalb" "scalbln" "scan" "select" "setpath" "significand" "sin" "sinh" "sort" - "sort_by" "split" "splits" "sqrt" "startswith" "stderr" "strflocaltime" "strftime" "strings" - "strptime" "sub" "tan" "tanh" "test" "tgamma" "to_entries" "todate" "todateiso8601" "tojson" - "tonumber" "tostream" "tostring" "transpose" "trunc" "truncate_stream" "type" "unique" - "unique_by" "until" "utf8bytelength" "values" "walk" "while" "with_entries" "y0" "y1" "yn")) - -; Keywords -[ - "def" - "as" - "label" - "module" - "break" -] @keyword - -[ - "import" - "include" -] @keyword.import - -[ - "if" - "then" - "elif" - "else" - "end" -] @keyword.conditional - -[ - "try" - "catch" -] @keyword.exception - -[ - "or" - "and" -] @keyword.operator - -; Operators -[ - "." - "==" - "!=" - ">" - ">=" - "<=" - "<" - "=" - "+" - "-" - "*" - "/" - "%" - "+=" - "-=" - "*=" - "/=" - "%=" - "//=" - "|" - "?" - "//" - "?//" - (recurse) ; ".." -] @operator - -; Punctuation -[ - ";" - "," - ":" -] @punctuation.delimiter - -[ - "[" - "]" - "{" - "}" - "(" - ")" -] @punctuation.bracket - -; Comments -(comment) @comment @spell diff --git a/queries/jq/injections.scm b/queries/jq/injections.scm deleted file mode 100644 index f8a7a35b0..000000000 --- a/queries/jq/injections.scm +++ /dev/null @@ -1,23 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -; test(val) -(query - ((funcname) @_function - (#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub")) - (args - . - (query - (string) @injection.content - (#set! injection.language "regex")))) - -; test(regex; flags) -(query - ((funcname) @_function - (#any-of? @_function "test" "match" "capture" "scan" "split" "splits" "sub" "gsub")) - (args - . - (args - (query - (string) @injection.content - (#set! injection.language "regex"))))) diff --git a/queries/jq/locals.scm b/queries/jq/locals.scm deleted file mode 100644 index 0b8a0997d..000000000 --- a/queries/jq/locals.scm +++ /dev/null @@ -1,10 +0,0 @@ -(funcdef - (identifier) @local.definition.function) - -(funcdefargs - (identifier) @local.definition.parameter) - -(funcname) @local.reference - -(index - (identifier) @local.reference) |
