Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ahmadrosid/hl

🌴 Syntax highlighting in Rust.
https://github.com/ahmadrosid/hl

Last synced: 22 days ago
JSON representation

🌴 Syntax highlighting in Rust.

Awesome Lists containing this project

README

        

# 🌴 HL (WIP)
Syntax highlighting written in Rust inspired by github syntax highlighter. The project is designed to generate html syntax highlighting. Originally I used at [heline.dev](https://heline.dev).

### 💡 Example
```bash
cargo run --package hl --example html examples/html.rs -l rust
```

### 💡 Example Result

![demo](/demo.png)

It will produce html code like this:

```html

// The comment section
fn main() {
let matches = App::new("hl")
.version("0.1.0");
let ada = 5;
if true {
String::new();
let a : Vec<char> = vec!['0'];
}
}

fn process(a: &str, b: char) {
println!(a, b);
}

```

See the result in browser [here](https://play.tailwindcss.com/JevzqYGpuH).

## Lexers
- [x] ActionScript ( ✅ Done )
- [x] Ada ( ✅ Done )
- [x] Bash ( ✅ Done )
- [x] C ( ✅ Done )
- [ ] Clojure ( 🚧 In Progress )
- [x] CSS ( ✅ Done )
- [x] CUDA ( ✅ Done )
- [x] Dart ( ✅ Done )
- [x] CPP ( ✅ Done )
- [x] C# ( ✅ Done )
- [x] Go ( ✅ Done )
- [ ] HTML ( 🚧 In Progress )
- [x] Ruby ( ✅ Done )
- [ ] Rust ( 🚧 In Progress )
- [x] Java ( ✅ Done )
- [x] Javascript ( ✅ Done )
- [x] JSON ( ✅ Done )
- [x] Kotlin ( ✅ Done )
- [x] Lua ( ✅ Done )
- [x] Markdown ( ✅ Done )
- [x] Nim ( ✅ Done )
- [x] PHP ( ✅ Done )
- [ ] Python ( 🚧 In Progress )
- [x] Typescript ( ✅ Done )
- [ ] Vue ( 🚧 In Progress )
- [x] Yaml ( ✅ Done )
- [x] Zig ( ✅ Done )
- [x] Toml ( ✅ Done )
- [x] Lua ( ✅ Done )
- [x] Groovy ( ✅ Done )
- [x] Makefile ( ✅ Done )
- [x] Erlang ( ✅ Done )
- [x] Vlang ( ✅ Done )
- [x] Coffescript ( ✅ Done )
- [x] Protocol Buffer ( ✅ Done )