-
Notifications
You must be signed in to change notification settings - Fork 0
/
snakemake.nanorc
33 lines (23 loc) · 1.16 KB
/
snakemake.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# A nano syntax sheet for Snakemake files
# by Bailey Harrington, 28 September 2020
# Specify the filename patterns this syntax applies to
syntax "python" "\.smk$" "Snakefile$" "\.snake$"
# describes the shebang line as the header
#header "^#!.*/python[-0-9._]*"
# Python keywords
color brightblue "\<(and|as|assert|break|class|continue|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield)\>"
# the function definition keyword for Python
color brightblue "def [0-9a-zA-Z_]+"
# strings
color green "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}"
color green "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}"
# multi-line comments
color green start=""""[^"]" end=""""" start="'''[^']" end="'''"
# regular comments
color brightmagenta "#.*$"
# Snakemake keywords
color brightblue "\<(include|workdir|onsuccess|onerror|ruleorder|localrules|configfile|touch|protected|temp|input|output|params|message|threads|resources|version|run|shell|benchmark|snakefile|log)\>"
# rule or subworkflow names
color brightmagenta "(rule|subworkflow)\s*[A-Za-z_]*"
# the Snakemake rule and subworkflow keywords
color blue "(rule|subworkflow)"