diff options
| author | Jacob Pfeifer <jacob@pfeifer.dev> | 2023-07-11 02:18:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-11 02:18:26 -0400 |
| commit | d186a9e95a478fa60e1bef86790c8787e7440d0e (patch) | |
| tree | cd384c0bc77c22ec0c918b50c2781d4715819596 /queries/hurl | |
| parent | ci: bump actions to latest (diff) | |
| download | nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar.gz nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar.bz2 nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar.lz nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar.xz nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.tar.zst nvim-treesitter-d186a9e95a478fa60e1bef86790c8787e7440d0e.zip | |
feat: add Hurl
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
---------
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
Diffstat (limited to 'queries/hurl')
| -rw-r--r-- | queries/hurl/folds.scm | 20 | ||||
| -rw-r--r-- | queries/hurl/highlights.scm | 133 | ||||
| -rw-r--r-- | queries/hurl/indents.scm | 14 | ||||
| -rw-r--r-- | queries/hurl/injections.scm | 7 |
4 files changed, 174 insertions, 0 deletions
diff --git a/queries/hurl/folds.scm b/queries/hurl/folds.scm new file mode 100644 index 000000000..d7b8cd6cd --- /dev/null +++ b/queries/hurl/folds.scm @@ -0,0 +1,20 @@ +; fold.scm + +[ + (comment) + (entry) + (request) + (response) + (header) + (request_section) + (body) + (response_section) + (multipart_form_data_section) + (cookies_section) + (captures_section) + (asserts_section) + (options_section) + (basic_auth_section) + (json_object) + (json_array) +] @fold diff --git a/queries/hurl/highlights.scm b/queries/hurl/highlights.scm new file mode 100644 index 000000000..a32f1965b --- /dev/null +++ b/queries/hurl/highlights.scm @@ -0,0 +1,133 @@ +; highlights.scm + +[ + "[QueryStringParams]" + "[FormParams]" + "[MultipartFormData]" + "[Cookies]" + "[Captures]" + "[Asserts]" + "[Options]" + "[BasicAuth]" + (key_string) + (json_key_string) +] @property + +[ + "\\" + (regex_escaped_char) + (quoted_string_escaped_char) + (key_string_escaped_char) + (value_string_escaped_char) + (oneline_string_escaped_char) + (multiline_string_escaped_char) + (filename_escaped_char) + (json_string_escaped_char) +] @string.escape + +[ + "status" + "url" + "header" + "cookie" + "body" + "xpath" + "jsonpath" + "regex" + "variable" + "duration" + "sha256" + "md5" + "bytes" +] @function.builtin + +[ + "null" + "cacert" + "compressed" + "location" + "insecure" + "path-as-is" + "proxy" + "max-redirs" + "retry" + "retry-interval" + "retry-max-count" + (variable_option "variable") + "verbose" + "very-verbose" +] @constant.builtin + +(boolean) @boolean + +(variable_name) @variable + +[ + "not" + "equals" + "notEquals" + "greaterThan" + "greaterThanOrEquals" + "lessThan" + "lessThanOrEquals" + "startsWith" + "endsWith" + "contains" + "matches" + "exists" + "includes" + "isInteger" + "isFloat" + "isBoolean" + "isString" + "isCollection" +] @keyword.operator + +[ + "==" + "!=" + ">" + ">=" + "<" + "<=" +] @operator + +[ + (integer) + (status) +] @number + +[ + (float) + (json_number) +] @float + +[ ":" "," ] @punctuation.delimiter + +[ "[" "]" "{" "}" "{{" "}}" ] @punctuation.bracket + +[ + (value_string) + (quoted_string) + (json_string) +] @string + + +[ + "base64," + "file," + "hex," + (file_value) + (version) +] @string.special + +(regex) @string.regex + +(multiline_string_type) @type + +(comment) @comment @spell + +(filter) @attribute + +(method) @type.builtin + diff --git a/queries/hurl/indents.scm b/queries/hurl/indents.scm new file mode 100644 index 000000000..232cfc01a --- /dev/null +++ b/queries/hurl/indents.scm @@ -0,0 +1,14 @@ +; indents.scm + +[ + (json_object) + (json_array) +] @indent.begin + +[ + "}" + "]" +] @indent.branch + +(xml_tag) @indent.begin +(xml_close_tag) @indent.branch diff --git a/queries/hurl/injections.scm b/queries/hurl/injections.scm new file mode 100644 index 000000000..933633e03 --- /dev/null +++ b/queries/hurl/injections.scm @@ -0,0 +1,7 @@ +; injections.scm +(json_value) @json +(xml) @html + +(multiline_string + (multiline_string_type) @language + (multiline_string_content) @content) |
