Description
Provide lexers for the Cylc suite definition syntax in different editors / systems.
Currently supported:
vi
-etc/syntax/cylc.vim
emacs
-etc/syntax/cylc-mode.el
gedit
-etc/syntax/cylc.lang
kate
-etc/syntax/cylc.xml
pygments
- cylc-sphinx-extensions
Planned support:
A few major editors support the TextMate grammar format:
- TextMate (TextMate)
- Atom (TextMate or Tree-sitter)
- Visual Code Studio (TextMate)
- Ace (TextMate)
Dropped support:
Feature support table:
🆗 - Full Support
⛔ - Not Supported
⛅ - Partial Support
Feature | Example | vi |
emacs |
gedit |
kate |
pygments |
---|---|---|---|---|---|---|
1. Basic INI/Cylc Syntax | ||||||
1.1 Sections / Settings | [a]b=c |
⛅ [3] | ⛅ [5, 6] | ⛅ [5] | ⛅ [5] | 🆗 |
1.2 Comments | a=c # c |
🆗 | 🆗 | 🆗 | 🆗 | 🆗 |
1.3 Multiline Str | """ ... |
🆗 | 🆗 | 🆗 | 🆗 | 🆗 |
1.4 Include Files | %include |
⛅ [1] | ⛔ | ⛅ [8] | ⛔ | 🆗 |
2. Exotic Cylc Syntax | ||||||
2.1 Graph tasks + deps | foo , => |
⛔ [14] | 🆗 [12] | ⛅ [9] | 🆗 | 🆗 |
2.2 Graph Comments | foo # Foo |
🆗 | 🆗 | 🆗 | 🆗 | 🆗 |
2.3 Graph operators | & , () , ! |
⛔ | ⛔ | 🆗 | ⛅ | 🆗 |
2.4 Inter-Suite | <a.b::c> |
⛔ | ⛔ | ⛔ | ⛔ | 🆗 |
2.5 xtriggers | @wall_clock |
⛔ | ⛔ | ⛔ | ⛔ | 🆗 |
2.6 Parameter | <x> |
⛔ | ⛔ | ⛔ | ⛔ | 🆗 |
2.7 Parameter | <x-1> |
⛔ | ⛔ | 🆗 | ⛔ | 🆗 |
2.8 Parameter | <x=1> |
⛔ | ⛔ | 🆗 | ⛔ | 🆗 |
2.9 Qualifier | a:fail |
⛅ [2] | ⛔ | ⛔ | ⛔ | 🆗 |
2.10 Inter-cycle | a[-P1D] |
🆗 | 🆗 | ⛔ | ⛔ | ⛅ [13] |
3. Templating | ||||||
3.1 Shebang | #!... |
🆗 | ⛔ | 🆗 | 🆗 | 🆗 |
3.2 Jinja2 | {% , {{ , {# |
🆗 | 🆗 |
⛅ [11] | 🆗 | 🆗 |
3.3 Jinja2 Multiline | {% \n %} |
🆗 | 🆗 | 🆗 | ⛔ | 🆗 |
3.4 empy (basic) | @X , @( , @[ |
⛅ [4] | ⛔ | ⛔ | ⛔ | 🆗 |
3.5 empy (full) | @? , @! , @... |
⛔ | ⛔ | ⛔ | ⛔ | ⛔ |
[1] Can't handle quoted file names.
[2] Problem with custom qualifiers containing underscores
[3] Equals characters in setting values breaks highlighting
[4] Parenthesis in expressions can cause issues
[5] Comments after sections break highlighting
[6] =>
symbols are highlighted outside of graph strings
[7] Cylc comments following Jinja2 blocks don't display as comments[Second observer: I don't see this issue?]
[8] Unquoted files aren't highlighted
[9] foo=>bar
displays incorrectly
[10] Suicide triggers not highlighted
[11] Jinja2 comments not displayed as comments
[12] =>
highlighted, & tasks appear in the same mode as e.g. standard values under sections but
that seems appropriate?
[13] Arbitrary whitespace not supported in arthymatic (e.g. [^+P1D]
is fine but [^ + P1D]
is not).
[14] =>
acknowledged in triple-, but not single-, quoted graph strings.
Please update the table as syntax capabilities change.
- 2018-10-05 suite.rc syntax lexers: improve emacs support #2784
- emacs
- Support multiline Jinja2 statements
- Fix scoping issues
- emacs
- 2019-01-07 pygments syntax: improve cylc lexer metomi/rose#2274
- pygments
- Support inter-suite triggers
- Support include files
- Support xtriggers
- Support empy
- Support arthritic in inter-cycle triggers
- Fix line continuation chars in headings
- pygments