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 /runtime/queries/hurl | |
| 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 'runtime/queries/hurl')
| -rw-r--r-- | runtime/queries/hurl/folds.scm | 19 | ||||
| -rw-r--r-- | runtime/queries/hurl/highlights.scm | 148 | ||||
| -rw-r--r-- | runtime/queries/hurl/indents.scm | 14 | ||||
| -rw-r--r-- | runtime/queries/hurl/injections.scm | 15 |
4 files changed, 196 insertions, 0 deletions
diff --git a/runtime/queries/hurl/folds.scm b/runtime/queries/hurl/folds.scm new file mode 100644 index 000000000..a0edfa930 --- /dev/null +++ b/runtime/queries/hurl/folds.scm @@ -0,0 +1,19 @@ +; 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/runtime/queries/hurl/highlights.scm b/runtime/queries/hurl/highlights.scm new file mode 100644 index 000000000..70b220985 --- /dev/null +++ b/runtime/queries/hurl/highlights.scm @@ -0,0 +1,148 @@ +; highlights.scm +[ + (key_string) + (json_key_string) +] @property + +[ + "[QueryStringParams]" + "[FormParams]" + "[MultipartFormData]" + "[Cookies]" + "[Captures]" + "[Asserts]" + "[Options]" + "[BasicAuth]" +] @module + +[ + "\\" + (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" + "verbose" + "very-verbose" +] @constant.builtin + +(variable_option + "variable" @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) +] @number.float + +[ + ":" + "," +] @punctuation.delimiter + +[ + "[" + "]" + "{" + "}" + "{{" + "}}" +] @punctuation.bracket + +[ + (value_string) + (quoted_string) + (json_string) +] @string + +[ + "base64," + "hex," + (version) +] @string.special + +[ + "file," + (file_value) +] @string.special.path + +(regex) @string.regexp + +(multiline_string_type) @type + +(comment) @comment @spell + +(filter) @attribute + +(method) @type.builtin diff --git a/runtime/queries/hurl/indents.scm b/runtime/queries/hurl/indents.scm new file mode 100644 index 000000000..af6fdfa4e --- /dev/null +++ b/runtime/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/runtime/queries/hurl/injections.scm b/runtime/queries/hurl/injections.scm new file mode 100644 index 000000000..41abb387b --- /dev/null +++ b/runtime/queries/hurl/injections.scm @@ -0,0 +1,15 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +; injections.scm +((json_value) @injection.content + (#set! injection.language "json")) + +((xml) @injection.content + (#set! injection.language "xml")) + +(multiline_string + (multiline_string_type) @_lang + (multiline_string_content) @injection.content + (#set-lang-from-info-string! @_lang) + (#set! injection.combined)) |
