Giter VIP home page Giter VIP logo

Comments (7)

jsjoeio avatar jsjoeio commented on August 23, 2024

Similar to that, the current syntax highlighter I'm using doesn't support Rust 😢 So that should be fixed as well.

image

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

Does GitHub support Rust? I would guess they do. Let's check

if x < 5 {
    x + 1
}

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

I'm going to take a stab at this!

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

Looking at the current syntax highlighter, it looks like these packages are involved:

  • "gatsby-remark-prismjs": "^3.3.28"
  • "prism-react-renderer": "^1.0.2"
  • "prism-themes": "^1.3.0"
  • "prismjs": "^1.17.1"

And the actual implementation happens in src/components/mdx/Code.js

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

So the implementation lies in this project prism-react-renderer. The question is:

  • can I easily add support for new languages like Rust?
  • can I export my VS Code theme and use that?

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

So I was able to add Rust pretty easily! The next step will be switching the theme to be my VS Code theme

from joeprevite.com.

jsjoeio avatar jsjoeio commented on August 23, 2024

I was able to add the vscode theme too!

from joeprevite.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.