Does everyone's code highlight on Discourse look so bland?

To my knowledge, Fredrik’s branch has not (yet) been upstreamed into highlights.js. It’d be great if it could!

Just to be clear, the things we have control over on Discourse are:

  • The default highlighting language — this is set to julia

  • The enabled highlighting languages — this is set to 33 languages and we can add more if you find it’d be helpful.

    List of currently enabled languages
    julia
    julia-repl
    bash
    cpp
    cs
    css
    diff
    fortran
    go
    haskell
    http
    ini
    java
    javascript
    json
    llvm
    makefile
    markdown
    mathematica
    matlab
    objectivec
    perl
    php
    python
    r
    ruby
    rust
    sql
    shell
    swift
    tex
    xml
    yaml
    
  • I think the themes’ CSS should be able to override the default styling of the identifiers. This doesn’t change which identifiers and syntaxes are highlighted, but it changes how they are highlighted. The defaults are here pulled from code_highlighting.scss I believe.


All of this is completely unrelated to how VS Code does its highlighting, which is powered by TextMate grammars.

2 Likes