-
Notifications
You must be signed in to change notification settings - Fork 94
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
cylc.nanorc #6072
cylc.nanorc #6072
Conversation
cylc/flow/etc/syntax/cylc.nanorc
Outdated
color cyan "#.*$" | ||
|
||
## Jinja2 | ||
icolor red "^#!Jinja2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is icolor
as opposed to color
?
Also, not sure red is a good choice as it tends to mean error/problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
icolor
is case insensitive regex so it will highlight #!Jinja2
or #!jinja2
or even #!jInJa2
(which is valid!).
The choice of colors is somewhat limited on the older version of Nano we have at the MetOffice, although newer versions of nano offer more choice - when I try I get:
Valid colors are "green", "red", "blue",
"white", "yellow", "cyan", "magenta" and
"black", with the optional prefix "bright"
for foreground colors.
(see also https://www.nano-editor.org/dist/latest/nanorc.5.html)
This comment was marked as resolved.
This comment was marked as resolved.
It's an enhancement, but it's very small with no knock on consequences or conceivable side effects and I don't see why it shouldn't go in the earliest possible release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍 Approval pending changelog entry. Also will need adding to cylc-doc. (Do actually follow checklist please!)
change the colour of the jinja2
|
||
## Values | ||
color yellow "=(.*)$" | ||
color green "=[^>]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this one about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=
signs that aren't =>
so we don't include graph deps.
Co-authored-by: Ronnie Dutta <[email protected]>
* upstream/master: (25 commits) Delete public DB if private DB does not exist on scheduler start (cylc#6070) Include xtrigger function signatures in `cylc config` (cylc#6071) Add Nano syntax highlighter (cylc#6072) Play should have no cylc rose options (cylc#6068) tests/integration: address urwid deprecation warning (cylc#6063) Bump dev version Prepare release 8.2.5 add mailmap entry Tutorials: avoid validation errors due to implicit tasks Update CONTRIBUTING.md Update xtrigger_mgr.py documentation Another small tweak. Tweak previous. Tutorials: increase sleep and don't sleep in CI Fix bad doctests tutorial: make the tutorial workflow run a little slower Style tweaks. Simply workflow-state code a bit. Add unit tests for workflow-state. Add to doc string. ...
Add a limited amount of Cylc syntax highlighting for Nano - I wrote this a while back, because Nano is my in terminal editor of choice, and handy for smaller toy workflows.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
(andconda-environment.yml
if present).CHANGES.md
entry included if this is a change that can affect users?.?.x
branch.