Holochain Forum

Discourse forum: Rust syntax highlighting

Currently, Rust syntax highlighting doesn’t seem to be available on this forum. I would suggest that not only this be made available, but that it become the default since that is what new Holochain apps are usually written in.

Here is a piece of Rust code using the default highlighting:

struct Foo;

impl Foo {
    pub fn bar(self) { }
}

Here is a piece of Rust code using ```rust:

struct Foo;

impl Foo {
    pub fn bar(self) { }
}

To show that ```language-name should matter, here’s a piece of code highlighted with ```python

# comment
// not a comment
"""
multi-line string
"""
struct NotHighlighted;

For admins trying to implement this, here are a few resources I found when researching this:

3 Likes

Thank you @timotree3 for the feedback. We’ll discuss this at our team meeting. We’ll turn it into an issue and/or a create a Trello card to make sure we implement this suggestion. Once implemented/addressed, we’ll update this thread. Hope all is well!

2 Likes