Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting for Snakemake (and Nextflow) language snippets #17

Open
tbooth opened this issue Apr 16, 2021 · 0 comments
Open

Syntax highlighting for Snakemake (and Nextflow) language snippets #17

tbooth opened this issue Apr 16, 2021 · 0 comments

Comments

@tbooth
Copy link

tbooth commented Apr 16, 2021

Hi,

I'm currently working on https://github.com/carpentries-incubator/snakemake-novice-bioinformatics which includes many snippets of Snakemake syntax. Snakemake is a superset of Python, so elsewhere in the incubator (eg. https://github.com/carpentries-incubator/workflows-snakemake) these code blocks are just marked as {. :language-python}. This is not ideal as the header for the code block then says "Python". I've been using simply {. :language} as I write new lessons, but of course this leaves all the code monochrome and the header just says "Code".

I'm not sure how the syntax highlighting engine works in all this, but would it be possible to:

Ideally, add Snakemake-specific support, if a compatible syntax definition is available (I know some editors like Vim have support already).

Or else, provide a {. :language-snakemake} option which activates Python3 syntax highlighting but changes the heading of the code cell to "Snakemake". This will be much better than what we have now, and if a full Snakemake syntax highlighter ever becomes available in future then no change to the lessons will be needed to take advantage of it.

I know a similar change would be good for https://github.com/carpentries-incubator/workflows-nextflow. In this case the language would be "Nextflow" and if a full Nextflow highlighter is not available then Groovy syntax would be appropriate.

Cheers,
Tim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant