Skip to content

Commit e623a48

Browse files
fix: added missing keywords for highlighting (#30)
* add envvars and container to highlight rules, bump to v0.4.1 * add other missing keywords * add scattergather keyword * add containerized * fix: add and to keywords --------- Co-authored-by: David Laehnemann <[email protected]>
1 parent d15b669 commit e623a48

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

languages/snakemake.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
],
9595
"onEnterRules": [
9696
{
97-
"beforeText": "\\s*(?:(?:rule|subworkflow|checkpoint|async|class|def|elif|except|for|if|while|with)\\s.*|(?:input|output|params|priority|shadow|group|log|benchmark|message|threads|resources|version|run|shell|script|cwl|conda|singularity|wildcard_constraints|wrapper|else|finally|try))\\s*:\\s*(?:#.*)?$",
97+
"beforeText": "\\s*(?:(?:rule|subworkflow|checkpoint|async|class|def|elif|except|for|if|while|with)\\s.*|(?:input|output|params|priority|shadow|group|log|benchmark|message|threads|resources|version|run|shell|script|cwl|container|shellcmd|name|norun|conda_env|container_img|containerized|is_containerized|env_modules|shadow_depth|docstring|notebook|template_engine|cache|path_modifier|handover|default_target|localrule|pepfile|pepschema|conda|singularity|wildcard_constraints|wrapper|else|finally|try))\\s*:\\s*(?:#.*)?$",
9898
"action": {
9999
"indent": "indent"
100100
}

src/keywords.yaml

+20-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ configs:
66
- onstart
77
- onsuccess
88
- ruleorder
9+
- scattergather
910
- snakefile
1011
- workdir
11-
- container
12+
- envvars
13+
- module
1214
- containerized
1315
- pepfile
1416
- pepschema
@@ -43,10 +45,27 @@ ruleparams:
4345
- wildcard_constraints
4446
- wrapper
4547
- default_target
48+
- pepfile
49+
- pepschema
4650
- template_engine
4751
- handover
4852
- container
4953
- containerized
54+
- shellcmd
55+
- name
56+
- norun
57+
- conda_env
58+
- container_img
59+
- is_containerized
60+
- env_modules
61+
- shadow_depth
62+
- docstring
63+
- notebook
64+
- template_engine
65+
- cache
66+
- path_modifier
67+
- handover
68+
- default_target
5069
- localrule
5170
- template_engine
5271

src/yaml/snakemake.language.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ surroundingPairs:
3737

3838
onEnterRules:
3939
- beforeText: >-
40-
\s*(?:(?:rule|subworkflow|checkpoint|async|class|def|elif|except|for|if|while|with)\s.*|(?:input|output|params|priority|shadow|group|log|benchmark|message|threads|resources|version|run|shell|script|cwl|conda|singularity|wildcard_constraints|wrapper|else|finally|try))\s*:\s*(?:#.*)?$
40+
\s*(?:(?:rule|subworkflow|checkpoint|async|class|def|elif|except|for|if|while|with)\s.*|(?:input|output|params|priority|shadow|group|log|benchmark|message|threads|resources|version|run|shell|script|cwl|conda|singularity|pepfile|pepschema|container|shellcmd|name|norun|conda_env|container_img|containerized|is_containerized|env_modules|shadow_depth|docstring|notebook|template_engine|cache|path_modifier|handover|default_target|localrule|wildcard_constraints|wrapper|else|finally|try))\s*:\s*(?:#.*)?$
41+
4142
action:
43+
4244
indent: indent

syntaxes/snakemake.tmLanguage.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"repository": {
2626
"configs": {
27-
"match": "(?x)\n ^\\s* # Leading whitespace\n (configfile|include|localrules|onerror|onstart|onsuccess|ruleorder|snakefile|workdir|pepfile|pepschema) # Keywords\n : # Ending in colon\n",
27+
"match": "(?x)\n ^\\s* # Leading whitespace\n (configfile|envvars|module|scattergather|include|localrules|onerror|onstart|onsuccess|ruleorder|snakefile|workdir|pepfile|pepschema) # Keywords\n : # Ending in colon\n",
2828
"captures": {
2929
"1": {
3030
"name": "keyword.control.snakemake.config"

0 commit comments

Comments
 (0)