diff options
Diffstat (limited to 'runtime/queries/cylc')
| -rw-r--r-- | runtime/queries/cylc/folds.scm | 10 | ||||
| -rw-r--r-- | runtime/queries/cylc/highlights.scm | 72 | ||||
| -rw-r--r-- | runtime/queries/cylc/indents.scm | 16 | ||||
| -rw-r--r-- | runtime/queries/cylc/injections.scm | 11 |
4 files changed, 109 insertions, 0 deletions
diff --git a/runtime/queries/cylc/folds.scm b/runtime/queries/cylc/folds.scm new file mode 100644 index 000000000..c8bd40703 --- /dev/null +++ b/runtime/queries/cylc/folds.scm @@ -0,0 +1,10 @@ +[ + (multiline_string) + (multiline_graph_string) + (top_section) + (sub_section_1) + (sub_section_2) + (runtime_section) + (task_section) + (graph_section) +] @fold diff --git a/runtime/queries/cylc/highlights.scm b/runtime/queries/cylc/highlights.scm new file mode 100644 index 000000000..a744caa52 --- /dev/null +++ b/runtime/queries/cylc/highlights.scm @@ -0,0 +1,72 @@ +(comment) @comment @spell + +(key) @property + +(boolean) @boolean + +(datetime) @string.special + +(task_name) @function + +(include_directive) @keyword.import + +[ + (section_name) + (namespace) +] @markup.heading + +[ + (integer) + (recurrence) +] @number + +[ + "[" + "]" + "[[" + "]]" + "[[[" + "]]]" + "<" + ">" + (graph_parenthesis) +] @punctuation.bracket + +[ + "\"" + "\"\"\"" + (unquoted_string) + (quoted_string) + (multiline_string) +] @string + +[ + (xtrigger_annotation) + (suicide_annotation) +] @attribute + +[ + "=" + (assignment_operator) + (graph_logical) + (graph_arrow) +] @operator + +(include_statement + path: (_)? @string.special.path) + +(task_parameter + name: (_)? @variable.parameter + selection: (_)? @variable.parameter) + +(task_output + ":" @tag + (nametag) @variable.builtin + "?"? @tag) + +[ + (jinja2_expression) + (jinja2_statement) + (jinja2_comment) + (jinja2_shebang) +] @keyword.directive diff --git a/runtime/queries/cylc/indents.scm b/runtime/queries/cylc/indents.scm new file mode 100644 index 000000000..0457e4580 --- /dev/null +++ b/runtime/queries/cylc/indents.scm @@ -0,0 +1,16 @@ +[ + (top_section) + (sub_section_1) + (sub_section_2) + (graph_section) + (runtime_section) + (task_section) +] @indent.begin + +(multiline_string + quotes_close: _ @indent.end) @indent.begin + +(multiline_graph_string + quotes_close: _ @indent.end) @indent.begin + +(line_continuation) @indent.zero diff --git a/runtime/queries/cylc/injections.scm b/runtime/queries/cylc/injections.scm new file mode 100644 index 000000000..41becd699 --- /dev/null +++ b/runtime/queries/cylc/injections.scm @@ -0,0 +1,11 @@ +((comment) @injection.content + (#set! injection.language "comment")) + +; https://cylc.github.io/cylc-doc/latest/html/user-guide/task-implementation/job-scripts.html#jobscripts +((setting + key: (key) @_key + (#any-of? @_key + "script" "init-script" "env-script" "pre-script" "post-script" "err-script" "exit-script") + value: (_ + (string_content) @injection.content)) + (#set! injection.language "bash")) |
