Syntax highlighter for source code parsed with Tree-Sitter and styled with Helix Editor themes.
- Support multiple languages and 100 themes. Check out some samples at https://autumn-30n.pages.dev
- Used by MDEx - a fast 100% CommonMark-compatible GitHub Flavored Markdown parser and formatter for Elixir
- Use Rust's inkjet crate under the hood
Add :autumn
dependency:
def deps do
[
{:autumn, "~> 0.1"}
]
end
Autumn.highlight!("elixir", "Atom.to_string(:elixir)") |> IO.puts()
#=> <pre class="autumn highlight" style="background-color: #282C34; color: #ABB2BF;">
#=> <code class="language-elixir" translate="no">
#=> <span class="namespace" style="color: #61AFEF;">Atom</span><span class="operator" style="color: #C678DD;">.</span><span class="function" style="color: #61AFEF;">to_string</span><span class="" style="color: #ABB2BF;">(</span><span class="string" style="color: #98C379;">:elixir</span><span class="" style="color: #ABB2BF;">)</span>
#=> </code></pre>
Autumn.highlight!("rb", "Math.sqrt(9)", theme: "dracula") |> IO.puts()
#=> <pre class="autumn highlight" style="background-color: #282A36; color: #f8f8f2;">
#=> <code class="language-ruby" translate="no">
#=> <span class="constructor" style="color: #BD93F9;">Math</span><span class="punctuation delimiter" style="color: #f8f8f2;">.</span><span class="function method" style="color: #50fa7b;">sqrt</span><span class="punctuation bracket" style="color: #f8f8f2;">(</span><span class="constant numeric" style="color: #BD93F9;">9</span><span class="punctuation bracket" style="color: #f8f8f2;">)</span>
#=> </code></pre>
Visit https://autumn-30n.pages.dev to see all available samples like the ones below:
At DockYard we are ready to help you build your next Elixir project. We have a unique expertise in Elixir and Phoenix development that is unmatched and we love to write about Elixir.
Have a project in mind? Get in touch!
- Logo created by by pongsakornRed - Flaticon
- Logo font designed by Astigmatic