# RFH: Updating highlighters for 0.6 syntax

**URL:** <https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650>\
**Category:** Community\
**Created:** [July 4, 2017, 8:42pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650 "2017-07-04T20:42:36Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ararslan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ararslan/32/3825_2.png) [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Post date:** [July 4, 2017, 8:42pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/1 "2017-07-04T20:42:36Z")

</div>

Hi there! As you may know, Julia 0.6 is now the stable release of Julia. This version has brought some significant changes to syntax, including to type definitions, free typevars, and infix `isa`. While many editor plugins and highlighters have been updated appropriately, a lot of highlighters in the wild don’t yet recognize these things. Some examples include:

- Pygments, ~~which highlights Jupyter notebooks~~

- CodeMirror, which highlights Jupyter notebooks

- Google Prettify, which highlights Stack Overflow

- Discourse 😱

(Please let me know if you come across others, and I can update this list accordingly.) Though it has been updated for 0.6, the definition for TextMate could still be vastly improved, and that’s actually what powers GitHub’s highlighting of Julia.

Thus I would like to request help from the community in getting everything updated. Having things nicely highlighted on 0.6 and higher will make us look that much fancier and more impressive. 🕶

If you need guidance in terms of what definitions can look like, try checking out the Julia definitions for things like [highlight.js](https://github.com/isagalaev/highlight.js/blob/master/src/languages/julia.js), or let me know if you have any questions. Thanks in advance to anyone willing to help out!

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [July 5, 2017, 4:16am UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/2 "2017-07-05T04:16:11Z")

</div>

Code Mirror (which does) jupyter hasn’t been updated since Feb.  
[https://github.com/codemirror/CodeMirror/blob/3d89b71b955b72e61430f7f38e2350489cad9e15/mode/julia/julia.js](https://github.com/codemirror/CodeMirror/blob/3d89b71b955b72e61430f7f38e2350489cad9e15/mode/julia/julia.js)

As well as JuPyTer it is used by a number of other online text editors.  
(I think just about everything that requires live highlighting in a text box uses code mirror, but there might be other compeditors)

For the IJulia case  
It is actually really annoying, because to get new syntax highlights (and with it also some of the autoindentation),  
it can’t just have a new release of IJulia,  
it requires a new release of CodeMirror, followed by a New release of JuPyTer.  
and I’m not sure that a release of IJulia is required at all.

More generally I wish there was a way we could move all those highlighers into to JuliaEditorSupport org.  
But they are individual files in other repos, so it is basically a pain – submodule hell.  
It might be a good idea to create a Repo that tracks all of them with just a markdown file with links (something like your openning post),  
and then issues can be raised for problems.  
What do you think @ararslan ?

---

<div class="post-metadata">

**Author:** ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)\
**Post date:** [July 5, 2017, 11:29am UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/3 "2017-07-05T11:29:10Z")

</div>

> [@ararslan](#):
>
> Discourse 😱  
> If it uses highlight.js, it might just require updating the version used by Discourse, since that has already been updated for 0.6

Discourse master just updated to the newest version of `highlight.js` and that change should drop soon™ on this instance.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 5, 2017, 1:50pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/4 "2017-07-05T13:50:55Z")

</div>

I just updated the grammar file for the VS Code julia extension. I’m currently just taking the atom-language-julia grammar periodically and then convert it from cson to json and that is it…

---

<div class="post-metadata">

**Author:** ![PabloZubieta](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@PabloZubieta](https://discourse.julialang.org/u/PabloZubieta)\
**Post date:** [July 7, 2017, 6:54pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/5 "2017-07-07T18:54:32Z")

</div>

I’ve been “maintaining” the Codemirror highlighter, but haven’t really made some time for updating it to work on 0.6. I’ll look into it.

---

<div class="post-metadata">

**Author:** ![malmaud](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/malmaud/32/29_2.png) [@malmaud](https://discourse.julialang.org/u/malmaud)\
**Post date:** [July 7, 2017, 6:54pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/6 "2017-07-07T18:54:52Z")

</div>

I know it’s subideal, but as soon as the codemirror syntax file is updated, hardcore Jupyter users could manually download it to the right local location to get the benefits immediately.

---

<div class="post-metadata">

**Author:** ![ararslan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ararslan/32/3825_2.png) [@ararslan](https://discourse.julialang.org/u/ararslan)\
**Post date:** [July 7, 2017, 6:56pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/7 "2017-07-07T18:56:37Z")

</div>

> [@oxinabox](#):
>
> It might be a good idea to create a Repo that tracks all of them with just a markdown file with links (something like your openning post),  
> and then issues can be raised for problems.

That seems like a good idea indeed. I’m not an EditorSupport member so I can’t make said repo but if you’d be willing to do that then I think that’d certainly be helpful to track things going forward.

---

<div class="post-metadata">

**Author:** ![PabloZubieta](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@PabloZubieta](https://discourse.julialang.org/u/PabloZubieta)\
**Post date:** [July 7, 2017, 6:59pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/8 "2017-07-07T18:59:04Z")

</div>

Maybe we can even make IJulia look for the latest version of the Codemirror highlighter and install it when building `IJulia`.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [July 8, 2017, 5:49am UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/9 "2017-07-08T05:49:15Z")

</div>

Go forth and raise issues:  
[https://github.com/JuliaEditorSupport/3rd-Party-Highlighters](https://github.com/JuliaEditorSupport/3rd-Party-Highlighters)

---

<div class="post-metadata">

**Author:** ![PabloZubieta](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@PabloZubieta](https://discourse.julialang.org/u/PabloZubieta)\
**Post date:** [July 8, 2017, 10:32pm UTC](https://discourse.julialang.org/t/rfh-updating-highlighters-for-0-6-syntax/4650/10 "2017-07-08T22:32:23Z")

</div>

I just pushed a PR to update the syntax over `CodeMirror`, and another one over `IJulia.jl` to download the latest syntax highlighter version when building `IJulia`

[https://github.com/codemirror/CodeMirror/pull/4842](https://github.com/codemirror/CodeMirror/pull/4842)  
[https://github.com/JuliaLang/IJulia.jl/pull/569](https://github.com/JuliaLang/IJulia.jl/pull/569)
