leandrocp
Autumn - Syntax highlighter powered by Tree-sitter and Neovim themes.
Autumn is a syntax highlighter powered by Tree-sitter and Neovim themes.
You can check out how it looks like at https://autumnus.dev/
Features
Backed by a Rust library
60+ languages
100+ Neovim themes
Formatters: html inline, html linked, terminal
Language auto-detection
Most Liked
hauleth
It is impossible to do with just parser, it would need to be full evaluator, especially that it requires to know about the called module.
leandrocp
Hey some updates for Autumn that might be worth checking out:
- Added support to include a header element wrapping the code block
- Added support to highlight specific lines using a CSS class or style (depends on the formatter)
- Added more languages and a Random button on the demo site https://autumnus.dev
- Functions to “bring your own theme” - you can edit themes and load at runtime
- Added more than 10 new themes and updated a few more
- Added new languages
Full changelog at Changelog — Autumn v0.4.1
josevalim
Really smart to use tree sitter for this. ![]()
leandrocp
v0.5.0 released with a focus on highlighting lines, for example to highlight some lines with custom style:
{:html_inline, highlight_lines: %{lines: [1, 3..5, 8], style: "background-color: #fff3cd; border-left: 3px solid #ffc107;"}}
Also updated languages and themes, and replace <span> with <div> for lines. Full changelog at Changelog — Autumn v0.5.0
leandrocp
Hey Valim thanks! Indeed tree-sitter works very well with a relatively small binary and possibly even smaller thanks to feature flags ![]()
Tree-sitter is pretty much becoming a standard and even vscode is exploring using it. Leaving this issue for those interested Explore using tree sitter for syntax highlighting · Issue #210475 · microsoft/vscode · GitHub







