diff options
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/queries/sproto/folds.scm | 6 | ||||
| -rw-r--r-- | runtime/queries/sproto/highlights.scm | 47 | ||||
| -rw-r--r-- | runtime/queries/sproto/indents.scm | 10 | ||||
| -rw-r--r-- | runtime/queries/sproto/injections.scm | 2 |
4 files changed, 65 insertions, 0 deletions
diff --git a/runtime/queries/sproto/folds.scm b/runtime/queries/sproto/folds.scm new file mode 100644 index 000000000..03253d108 --- /dev/null +++ b/runtime/queries/sproto/folds.scm @@ -0,0 +1,6 @@ +[ + (type_definition) + (protocol_definition) + (request_block) + (response_block) +] @fold diff --git a/runtime/queries/sproto/highlights.scm b/runtime/queries/sproto/highlights.scm new file mode 100644 index 000000000..cd86ed22d --- /dev/null +++ b/runtime/queries/sproto/highlights.scm @@ -0,0 +1,47 @@ +(comment) @comment @spell + +[ + "." + ":" +] @punctuation.delimiter + +"*" @operator + +[ + "request" + "response" +] @keyword + +(type_definition + name: (identifier) @type) + +(nested_type_definition + name: (identifier) @type) + +(type_specifier) @type + +[ + "integer" + "boolean" + "string" + "binary" + "double" +] @type.builtin + +(protocol_definition + name: (identifier) @function) + +(field_definition + name: (identifier) @property) + +(map_specifier + key: (identifier) @property) + +(integer) @number + +[ + "(" + ")" + "{" + "}" +] @punctuation.bracket diff --git a/runtime/queries/sproto/indents.scm b/runtime/queries/sproto/indents.scm new file mode 100644 index 000000000..33147d540 --- /dev/null +++ b/runtime/queries/sproto/indents.scm @@ -0,0 +1,10 @@ +[ + (type_definition) + (protocol_definition) + (request_block) + (response_block) +] @indent.begin + +"}" @indent.end @indent.branch + +(comment) @indent.auto diff --git a/runtime/queries/sproto/injections.scm b/runtime/queries/sproto/injections.scm new file mode 100644 index 000000000..2f0e58eb6 --- /dev/null +++ b/runtime/queries/sproto/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
