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

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

Open
jannisspeer opened this issue Apr 26, 2023 · 0 comments

Comments

@jannisspeer
Copy link

jannisspeer commented Apr 26, 2023

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:

  • shellcmd
  • name
  • norun
  • conda_env
  • container_img
  • is_containerized
  • env_modules
  • shadow_depth
  • docstring
  • notebook
  • template_engine
  • cache
  • path_modifier
  • handover
  • default_target
  • localrule

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

  • envvars
  • module

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.

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