Github now recognizes and highlights Stan files

50 views
Skip to first unread message

Jeffrey Arnold

unread,
Jan 17, 2016, 8:45:02 PM1/17/16
to stan...@googlegroups.com
Just a heads up; as of a couple of days ago Github recognizes Stan language files and will highlight them (see https://github.com/github/linguist/pull/2809). Github uses the Ruby package linguist (https://github.com/github/linguist) for their syntax highlighting and language detection.  For the syntax highlighting itself it uses grammar for Stan that I wrote for an Atom package: https://github.com/jrnold/atom-language-stan. This means that you should also be able to get syntax highlighting in markdown files as rendered on Github.

Michael Betancourt

unread,
Jan 17, 2016, 9:10:45 PM1/17/16
to stan...@googlegroups.com
I have been dreaming of Stan highlighting in Atom!  Thanks for putting
that together — you should advertise it on the Users’ list!

On Jan 18, 2016, at 1:45 AM, Jeffrey Arnold <jeffrey...@gmail.com> wrote:

Just a heads up; as of a couple of days ago Github recognizes Stan language files and will highlight them (see https://github.com/github/linguist/pull/2809). Github uses the Ruby package linguist (https://github.com/github/linguist) for their syntax highlighting and language detection.  For the syntax highlighting itself it uses grammar for Stan that I wrote for an Atom package: https://github.com/jrnold/atom-language-stan. This means that you should also be able to get syntax highlighting in markdown files as rendered on Github.

--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeffrey Arnold

unread,
Jan 17, 2016, 10:05:58 PM1/17/16
to stan...@googlegroups.com
Will do, I wanted to wait until the github highlighting is live. I don't use Atom much, though it is the first editor that has tempted me to leave emacs. I mostly wrote the package because it has a grammar compatible with what linguist uses. Let me know if you find any issues with the grammar. Next time I'm bored or have some time, I'll add a linter.

Jonah Gabry

unread,
Jan 17, 2016, 11:12:37 PM1/17/16
to stan development mailing list
This is really great. Stan is now showing up in the language statistics for rstanarm. Do you think it will also index the Stan code? Thanks for doing this!

I'm also an atom fan. I pretty much use atom or RStudio for all of my coding work.

Dustin Tran

unread,
Jan 17, 2016, 11:32:35 PM1/17/16
to stan...@googlegroups.com
This is incredible in the most trivial way. My life is complete. :-)

Dustin
> On Jan 17, 2016, at 11:12 PM, Jonah Gabry <jga...@gmail.com> wrote:
>
> This is really great. Stan is now showing up in the language statistics for rstanarm. Do you think it will also index the Stan code? Thanks for doing this!
>
> I'm also an atom fan. I pretty much use atom or RStudio for all of my coding work.
>

Alp Kucukelbir

unread,
Jan 18, 2016, 8:18:21 AM1/18/16
to stan development mailing list
+1 i'm amused by how happy this makes me :)

Daniel Lee

unread,
Jan 18, 2016, 11:00:50 AM1/18/16
to stan-dev mailing list
+1 !!!

On Mon, Jan 18, 2016 at 8:18 AM, Alp Kucukelbir <akucu...@gmail.com> wrote:
+1 i'm amused by how happy this makes me :)

Jeffrey Arnold

unread,
Jan 18, 2016, 12:53:57 PM1/18/16
to stan...@googlegroups.com
It looks like Github indexes the file types of a repo whenever you push to the master branch of that repo (https://help.github.com/articles/my-repository-is-marked-as-the-wrong-language/). So next time the master branch of stan is updated, it should be recognized. Stan also now appears as an option for language in the Github advanced search (https://github.com/search/advanced). But I don't get any results for searches yet, so I don't know what's going on.

On Sun, Jan 17, 2016 at 8:12 PM, Jonah Gabry <jga...@gmail.com> wrote:
This is really great. Stan is now showing up in the language statistics for rstanarm. Do you think it will also index the Stan code? Thanks for doing this!

I'm also an atom fan. I pretty much use atom or RStudio for all of my coding work.
Reply all
Reply to author
Forward
0 new messages