Skip to content

Language support and snippets for Snakemake workflows (Snakefile, *.smk) for Visual Studio Code and Apache Theia.

License

Notifications You must be signed in to change notification settings

snakemake/snakemake-lang-vscode-plugin

Repository files navigation

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

Snakemake syntax highlighting example

Example taken from Snakemake documentation.

Supported Syntax

Keywords and Functions
  • Configurations
    • configfile
    • include
    • localrules
    • onerror
    • onstart
    • onsuccess
    • ruleorder
    • snakefile
    • workdir
  • Rules
    • checkpoint
    • rule
    • subworkflow
  • Rule Parameters
    • benchmark
    • conda
    • cwl
    • group
    • input
    • log
    • message
    • output
    • params
    • priority
    • resources
    • run
    • script
    • shadow
    • shell
    • singularity
    • threads
    • version
    • wildcard_constraints
    • wrapper
  • Functions
    • ancient
    • directory
    • expand
    • pipe
    • protected
    • temp
    • touch
    • unpack

TODO

  • Indentation rules (really tricky for some reason)
  • Recognize string substitutions: "command {input}"
  • Recognize wildcard constraints inside string substitutions: "{sample,[A-Za-z0-9]+}"

Snakemake Support for other Editors

About

Language support and snippets for Snakemake workflows (Snakefile, *.smk) for Visual Studio Code and Apache Theia.

Resources

License

Stars

Watchers

Forks

Packages

No packages published