-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add Cuneiform programming language #4157
Conversation
I admit I have difficulties understanding why some of the tests fail. Most of the failures seem to originate in |
Alllrighty, putting aside my language-obsessed nerdiness, let's have a look at these build results:
These are unrelated to your real changes, and suggest that your fork is a few releases behind upstream. Specifically, your submodules need updating. Try running If that doesn't work, it might help to trash everything and start from a fresh fork. 👍 |
lib/linguist/languages.yml
Outdated
- "cf_client" | ||
color: "#501616" | ||
tm_scope: none | ||
language_id: 2699 |
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.
The language_id
has an oddly low value. It's usually somewhere in the neighbourhood of 931814000
: it gets generated when running script/set-language-ids --update
. Did you use the script, or was it added by hand?
If you didn't use the script, it's also possible the submodule wasn't fully registered, which can lead to other sorts of test failures. =)
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.
No, I picked a number that did not appear in the yml file :D
will correct ...
lib/linguist/languages.yml
Outdated
- "cuneiform" | ||
- "cf_client" | ||
color: "#2772b0" | ||
tm_scope: none |
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.
Even though it's a different language, you can use Ruby's grammar for Cuneiform highlighting. The results look decent enough.
If that isn't good enough, just give me the formal language specification, and I'll write a grammar for you. 😉
Even if my installation is broken, I don't understand how this affects Travis CI. I changed one file and added 4 samples, nothing more. I did this:
|
Hrm, that's strange. 😥 Your fork is up-to-date with |
I have just run
on a clean checkout of the |
@joergen7 What does Submodules are managed independently of the "parent" module, which means it isn't enough to run
Try running |
Running
outputs nothing the second time I run it. (The first time it is quite verbose, should I grep?) |
I don't believe that the latest version of |
What do you see when you run |
Running
Also when I build from a clean clone of linguist I get the following output: I am getting two errors on both a clean checkout and my pull request. below is the output of Here is how I sync the pull request with the master:
|
I guess I'll just wait for a fix. In the mean time: Do you think I can use the grammar-spec I created for Sublime-text here? Is there a hint which grammar specs are ok, naming conventions for directories, etc? |
Erm, I'm not sure. I recall that we had troubles a while ago with parsing |
That's fine. Now I know I have to build an ace-grammar. But that's good for ace users, I guess. |
Although your grammar is pretty self-explanatory... I'm not seeing any of Sublime's "incompatible" grammar features (the pushing and popping thing). Give me a moment, I'll convert it to a CSON file which you can stick in a |
It pushes for Hey, thanks for the contribution! |
Done. See joergen7/cuneiform-atom#1 =) Now, adding a grammar to Linguist is simply a case of running the $ script/add-grammar joergen7/cuneiform-syntax-highlight
# Or like this, both notations are supported.
$ script/add-grammar https://github.com/joergen7/cuneiform-syntax-highlight |
The Travis CI build failure is unrelated to this pull request and we'll have to fix it on master. In any case, using this search query, I count only 6 users of that file extension for Cuneiform. That won't be enough to meet our hundreds-of-repositories criteria. |
@pchaigno Thanks for having considered my pull request, even though it did not meet the user-threshold criterion. I will just close this pull request and re-open it, should we manage to meet all necessary criteria. |
👍 |
This PR adds an entry for Cuneiform in
languages.yml
. Also, it adds a few code samples to the sample directory.Description
Checklist:
I am associating a language with a new file extension.
I am adding a new language.
I am fixing a misclassified language
I am changing the source of a syntax highlighting grammar
I am adding new or changing current functionality