snakemake / snakemake-lang-vscode-plugin

Language support and snippets for Snakemake workflows (Snakefile, *.smk) for Visual Studio Code and Apache Theia.
MIT License
13 stars 13 forks source link

Missing keywords from syntax highlighter and wrongly highlighted built-in functions #25

Open jannisspeer opened 1 year ago

jannisspeer commented 1 year ago

A lot of snakemake keywords are not highlighted. Especially rule params like mentioned in issue #23, #18 and #14. The following rule params are not highlighted:

Besides this, also no PEP keywords are highlighted #22 and, to my knowledge, also the kewords:

It would be nice to have a script which collects all keywords. This is maybe possible from the parser.py file. For the rule params the ruleinfo.py scripyt would be also possible.

As explained issue #15 built-in functions like expand are not highlighted properly. This can be fixed by integrating the snakemake rules in the MagicPython grammar. In my fork of this repo, I could implement this by copying and modifying the whole MagicPython grammar. Unfortunately, I did not find a way to just use the include rule key to load the MagicPython grammar and overwrite the rules that I wanted to include the sankemake rules in.