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:
- The discussion about highlighting on the Rust users discourse
- This comment showing how to create a plugin that adds a new syntax.
- How to install plugins