-
Notifications
You must be signed in to change notification settings - Fork 93
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 Files #2752
Comments
I volunteer myself as (Oh & +1 for creative emoji use.) |
@sadielbartholomew - I was an emacs user once, and then ... |
(apologies 🐑-ish 😁) |
That made me 'laugh out loud', though I don't think I will be having such a revelatory moment (with vim certainly... maybe with Atom)! |
To be fair it did take me a little while to see the light! |
IDEs aside the top text editors from the StackOverflow survey:
|
...okay so I was completely wrong about emacs & vim being the two dominant editors (I got this impression but admittedly never thought to investigate)! Those are interesting stats indeed. |
There's also MS Visual Studio Code, a standalone code editor built on electron. It's pretty slick and has a pretty comprehensive vim emulation mode. I tried it a while ago, but I felt a bit "dirty", and I still like the lightness of vim. |
I have also tried VSCode recently (on my home Windows box and an Ubuntu VM). It is pretty good. Not sure if I can actually use it for real productivity work or not. |
Added to the list, I thought it was an IDE (been a while since I used visual studio). |
I've come across EmPy highlighting for Atom, maybe it will be useful: |
(Updated main table in leading comment to reflect emacs mode update from merge of #2784.) |
n.b. I have started playing with with textMate for VSCode, and have got the basic bits working. |
Tim, as (now!) a VSCode user, who's just been hunting around a bit re options for rose/cylc, give me a shout if extra (noob-level) support on looking into textMate/being pilot user/reviewing docs/other helpful! |
Just to announce I've picked up on Tim's TextMate grammar for VSCode, should be ready to go in a few days time. As discussed in the last couple of Metomi video meetings, we'll need to figure out how we're going to host it, GitHub-repo-wise, considering it'll also be ported over to Atom |
The VSCode/TextMate grammar is in an almost deliverable state.
[1] Enabled even if I've done it using a JavaScript file that can get 'compiled' to the JSON grammar file (used by VSCode and Atom). This makes it easier to reuse things when you have several similar rules. The question is, how are we going to host it? I think we'll need separate repos for the VSCode and Atom versions of the grammar. How about an independent main repo for just the core TextMate grammar files (js, JSON and build scripts)? The VSCode and Atom repos could be modified clones and get merged into from the main repo, for new releases? In any case, we could create the VSCode repo for now - should I create an empty repo then do a PR with all the commits so far? |
The grammar ( and entire vscode plugin) are static so this isn’t really the domain of package managers like npm. I think this might just be the kind of problem git Submodules we’re created to solve. We would - Create a repo with the text mate extension in and a bunch of other repos for vscode, atom, heck maybe even textmate itself which use the same git Submodule. Thoughts? |
I hadn't heard of submodules before but that looks promising |
This comment has been minimized.
This comment has been minimized.
I had a go at opening about 6 suites randomly picked from |
Note our syntax support is far from perfect for any editor (I still use Vim mostly) so I woudn't worry too much about "the crispy bits" (nicely put @wxtim 😁 ) |
Agreed, just document the deficiencies in the table above, this is something we may get people in the Cylc community working on. |
(Posting here in addition to Discourse) The extension for VSCode has been released: Visual Studio Marketplace; GitHub repo Plus TextMate bundle for TextMate, PyCharm, WebStorm & Sublime Text 3: GitHub repo Update: the package for Atom has been released: https://atom.io/packages/language-cylc |
Provide lexers for the Cylc suite definition syntax in different editors / systems.
Currently supported:
vi
-etc/syntax/cylc.vim
emacs
-etc/syntax/cylc-mode.el
gedit
-etc/syntax/cylc.lang
kate
-etc/syntax/cylc.xml
pygments
- cylc-sphinx-extensionsPlanned support:
A few major editors support the TextMate grammar format:
Dropped support:
Feature support table:
🆗 - Full Support
⛔ - Not Supported
⛅ - Partial Support
vi
emacs
gedit
kate
pygments
[a]b=c
a=c # c
""" ...
%include
foo
,=>
foo # Foo
&
,()
,!
<a.b::c>
@wall_clock
<x>
<x-1>
<x=1>
a:fail
a[-P1D]
#!...
{%
,{{
,{#
[7]{% \n %}
@X
,@(
,@[
@?
,@!
,@...
[1] Can't handle quoted file names.
[2] Problem with custom qualifiers containing underscores
[3] Equals characters in setting values breaks highlighting
[4] Parenthesis in expressions can cause issues
[5] Comments after sections break highlighting
[6]
=>
symbols are highlighted outside of graph strings[7] Cylc comments following Jinja2 blocks don't display as comments[Second observer: I don't see this issue?][8] Unquoted files aren't highlighted
[9]
foo=>bar
displays incorrectly[10] Suicide triggers not highlighted
[11] Jinja2 comments not displayed as comments
[12]
=>
highlighted, & tasks appear in the same mode as e.g. standard values under sections butthat seems appropriate?
[13] Arbitrary whitespace not supported in arthymatic (e.g.
[^+P1D]
is fine but[^ + P1D]
is not).[14]
=>
acknowledged in triple-, but not single-, quoted graph strings.Please update the table as syntax capabilities change.
The text was updated successfully, but these errors were encountered: