Snakemake Language Support
Provides basic language support for Snakemake files (Snakefile, *.smk).
Feedback, suggestions, and contributions are very welcome!
This project has been started by Peter Alping, and can be considered a fork of this repository.
Features
- Syntax definitions based on Python, with added Snakemake keywords
- Language rules based on Python
- Snippets
Example

Example taken from Snakemake documentation.
Supported Syntax
[Keywords and Functions](https://github.com/snakemake/snakemake-lang-vscode-plugin/blob/HEAD/src/keywords.yaml)
Configurations
Rules and Modules
rule <rulename>: defines a rule with its parameters, followed by an indented body
- [
checkpoint <rulename>: ] is a special type of rule that allows dynamic determination of workflow steps based on its output.
module <modulename>: declares a module repository from which rules can be imported
subworkflow is now deprecated
Rule Parameters
- Used in
rule and checkpoint blocks to define inputs, outputs, and other settings.
- You can re-
used rule <rulename> as <newrulename> ... with different parameters, but you cannot change the way it runs, including:
Module Parameters:
Global Variables:
- The following classes are available without explicit import from the snakemake module:
- Important variables used across workflows include:
Job Parameters:
- These parameters are only available during job execution and should be used within
run or shell blocks
- input
- output
- params
- wildcards
- threads
- resources
- log
config is a dict that contains the configuration values and can be accessed everywhere
Functions:
TODO
- [x] recognize files provided as string after
include: , conda , snakefile , and allow quickly jumping to them
- [x] add bash-color to docstring in
shell: block
- [ ] Indentation rules (really tricky for some reason)
- [ ] Recognize wildcard constraints inside string substitutions:
"{sample,[A-Za-z0-9]+}"
Snakemake Support for other Editors
| |