Skip to content

Commit df10bf5

Browse files
authored
Add Nano syntax highlighter (cylc#6072)
1 parent 40139b1 commit df10bf5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

changes.d/6072.feat.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Nano Syntax Highlighting now available.

cylc/flow/etc/syntax/cylc.nanorc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# How to use this file:
2+
# cylc get-resources cylc.nanorc ~/.config/nano/cylc.nanorc
3+
# Add the following to ~/.nanorc
4+
# include ~/.config/nano/cylc.nanorc
5+
6+
# Supports `.cylc` files
7+
syntax "Cylc" "\.cylc$"
8+
9+
## Multiline
10+
color yellow start="\"\"\"" end="\"\"\""
11+
color yellow start="'''" end="'''"
12+
color yellow start="\[" end="\]"
13+
14+
## Values
15+
color yellow "=(.*)$"
16+
color green "=[^>]"
17+
color brightmagenta "=>|&|\|\\"
18+
19+
## Valid headings
20+
color green "^\s*\[.*\]"
21+
color green "^\s*\[\[.*\]\]"
22+
color green "^\s*\[\[\[.*\]\]\]"
23+
24+
## Comments (keep at the end of this file!)
25+
color cyan "#.*$"
26+
27+
## Jinja2
28+
icolor brightcyan "^#!Jinja2"
29+
color brightcyan "\{%.*%\}"
30+
color brightcyan "\{\{.*\}\}"

0 commit comments

Comments
 (0)