docs.rs failed to build autumnus-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
autumnus-0.9.0
Autumnus
Autumnus is a syntax highlighter powered by tree-sitter and Neovim themes. It provides beautiful and accurate syntax highlighting for over 50 programming languages with support for over 100 themes.
Features
- 🎨 Over 100 themes including popular ones like:
- Dracula, Catppuccin, Tokyo Night, Gruvbox
- GitHub themes (light/dark)
- Solarized variants
- Nord, OneDark, and many more
- 🌳 Tree-sitter powered syntax highlighting for accurate parsing
- 📝 Support for 50+ programming languages
- 🎯 Multiple output formats:
- HTML with inline styles
- HTML with linked stylesheets
- Terminal output with ANSI colors
- 🔍 Automatic language detection from file extensions
- 🚀 Zero configuration needed to get started
Installation
Add Autumnus to your Cargo.toml:
[]
= "0.1.0"
Usage
Basic Example
use ;
let code = r#"
function greet(name) {
console.log(`Hello ${name}!`);
}
"#;
let html = highlight;
Using a Specific Theme
use ;
let code = "SELECT * FROM users WHERE active = true;";
let html = highlight;
Language Detection from File Path
use ;
let code = r#"
defmodule MyApp do
def hello, do: :world
end
"#;
// Language will be automatically detected as Elixir from the .ex extension
let html = highlight;
Terminal Output with ANSI Colors
use ;
let code = "puts 'Hello from Ruby!'";
let ansi = highlight;
HTML with Linked Stylesheets
use ;
let code = "console.log('Hello!')";
let html = highlight;
When using FormatterOption::HtmlLinked, include the corresponding CSS file for your chosen theme:
Supported Languages
Autumnus supports a wide range of programming languages, including but not limited to:
- Angular
- Astro
- Bash
- C/C++
- C#
- Clojure
- CSS/SCSS
- Dockerfile
- Elixir/EEx/HEEx
- Elm
- Erlang
- F#
- Go
- GraphQL
- Haskell
- HTML
- Java
- JavaScript/TypeScript
- JSON
- Kotlin
- LaTeX
- Lua
- Markdown
- OCaml
- PHP
- Python
- Ruby
- Rust
- SQL
- Swift
- TOML
- XML
- YAML
- And many more!
Check the documentation for a complete list of supported languages and file extensions.
Available Themes
Autumnus includes over 100 themes, such as:
- Dracula and Dracula Soft
- Catppuccin (Mocha, Macchiato, Frappe, Latte)
- GitHub themes (Light/Dark, High Contrast, Colorblind)
- Gruvbox (Light/Dark variants)
- Nord
- OneDark variants
- Rose Pine
- Solarized variants
- Tokyo Night variants
- And many more!
Visit the documentation for a complete list of available themes.
Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Add new themes
- Add support for new languages
- Improve documentation
Acknowledgements
Autumnus would not be possible without theses projects: