{"id":42371999,"url":"https://github.com/leandrocp/lumis","last_synced_at":"2026-04-18T18:09:09.762Z","repository":{"id":280904569,"uuid":"932932619","full_name":"leandrocp/lumis","owner":"leandrocp","description":"Syntax Highlighter powered by Tree-sitter and Neovim themes.","archived":false,"fork":false,"pushed_at":"2026-04-15T15:45:15.000Z","size":520421,"stargazers_count":80,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-15T17:32:01.628Z","etag":null,"topics":["cli","code-highlighter","elixir","java","neovim","rust","syntax-highlighter","syntax-highlighting","tree-sitter","tree-sitter-highlight"],"latest_commit_sha":null,"homepage":"https://lumis.sh","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leandrocp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"leandrocp"}},"created_at":"2025-02-14T19:40:42.000Z","updated_at":"2026-04-15T15:45:19.000Z","dependencies_parsed_at":"2025-10-26T02:34:04.012Z","dependency_job_id":null,"html_url":"https://github.com/leandrocp/lumis","commit_stats":null,"previous_names":["leandrocp/autumnus","leandrocp/lumis"],"tags_count":112,"template":false,"template_full_name":null,"purl":"pkg:github/leandrocp/lumis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandrocp%2Flumis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandrocp%2Flumis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandrocp%2Flumis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandrocp%2Flumis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leandrocp","download_url":"https://codeload.github.com/leandrocp/lumis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leandrocp%2Flumis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31974997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","code-highlighter","elixir","java","neovim","rust","syntax-highlighter","syntax-highlighting","tree-sitter","tree-sitter-highlight"],"created_at":"2026-01-27T19:41:25.096Z","updated_at":"2026-04-18T18:09:09.755Z","avatar_url":"https://github.com/leandrocp.png","language":"CSS","readme":"\n\u003ch1 align=\"center\"\u003eLumis\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lumis.sh\"\u003e\u003cimg src=\"assets/intro.jpg\" alt=\"Lumis Syntax Highlighter\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://lumis.sh\"\u003elumis.sh\u003c/a\u003e\n  -\n  \u003ca href=\"https://lumis.sh/docs\"\u003edocs\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://crates.io/crates/lumis\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/lumis\" alt=\"Crates.io\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@lumis-sh/lumis\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@lumis-sh/lumis\" alt=\"npm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hex.pm/packages/lumis\"\u003e\u003cimg src=\"https://img.shields.io/hexpm/v/lumis\" alt=\"Hex.pm\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://central.sonatype.com/artifact/io.roastedroot/lumis4j\"\u003e\u003cimg src=\"https://img.shields.io/maven-central/v/io.roastedroot/lumis4j\" alt=\"Maven Central\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- **110+ Tree-sitter languages** - Fast, accurate, and updated syntax parsing\n- **250+ built-in Neovim themes** - Updated and curated themes from the Neovim community\n- **6 runtimes** - CLI, Rust, Elixir, JavaScript, Browsers / CDN, Java\n- **Multiple outputs** - HTML (inline/linked), Terminal (ANSI), Multi-theme (light/dark), BBCode, and custom formatters\n- **Language auto-detection** - File extension, shebang, and emacs-mode support\n- **Streaming-friendly** - Handles incomplete code\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cimg src=\"assets/ruby.png\" alt=\"Ruby with Catppuccin Frappe theme\"\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cimg src=\"assets/sql.png\" alt=\"SQL with GitHub Light theme\"\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Quick Start\n\n### [CLI](https://crates.io/crates/lumis-cli)\n\n```bash\ncargo install lumis-cli\n\nlumis highlight app.js --theme dracula\n```\n\n### [Rust](https://crates.io/crates/lumis)\n\n```rust\nuse lumis::{highlight, HtmlInlineBuilder, languages::Language, themes};\n\nlet theme = themes::get(\"dracula\").unwrap();\n\nlet formatter = HtmlInlineBuilder::new()\n    .language(Language::Javascript)\n    .theme(Some(theme))\n    .build()\n    .unwrap();\n\nlet html = highlight(\"const x = 1\", formatter);\n```\n\n### [JavaScript](https://www.npmjs.com/package/@lumis-sh/lumis)\n\nWorks in JavaScript runtimes including Node.js, Bun, and Deno.\n\n```javascript\nimport { highlight } from '@lumis-sh/lumis'\nimport { htmlInline } from '@lumis-sh/lumis/formatters'\nimport javascript from '@lumis-sh/lumis/langs/javascript'\nimport dracula from '@lumis-sh/themes/dracula'\n\nconst html = await highlight('const x = 1', htmlInline({ language: javascript, theme: dracula }))\n```\n\n### [Browsers / CDN](https://www.npmjs.com/package/@lumis-sh/lumis)\n\nWorks in Browsers through bundlers or CDN imports.\n\n```javascript\nimport { highlight } from 'https://esm.sh/@lumis-sh/lumis'\nimport { htmlInline } from 'https://esm.sh/@lumis-sh/lumis/formatters'\nimport javascript from 'https://esm.sh/@lumis-sh/lumis/langs/javascript'\nimport dracula from 'https://esm.sh/@lumis-sh/themes/dracula'\n\nconst html = await highlight('const x = 1', htmlInline({ language: javascript, theme: dracula }))\n```\n\n### [Elixir](https://hex.pm/packages/lumis)\n\n```elixir\nLumis.highlight!(\"const x = 1\", formatter: {:html_inline, language: \"javascript\", theme: \"dracula\"})\n```\n\n### [Java](https://github.com/roastedroot/lumis4j)\n\nBy [@andreaTP](https://github.com/andreaTP). More details at https://chicory.dev/blog/syntax-highlight\n\n```java\nimport io.roastedroot.lumis4j.core.Lumis;\nimport io.roastedroot.lumis4j.core.Lang;\nimport io.roastedroot.lumis4j.core.Theme;\n\nvar lumis = Lumis.builder().build();\n\nvar highlighter = lumis.highlighter()\n    .withLang(Lang.JAVASCRIPT)\n    .withTheme(Theme.DRACULA)\n    .build();\n\nvar result = highlighter.highlight(\"const x = 1\");\nSystem.out.println(result.string());\n```\n\n## Documentation\n\n| Runtime | Install | Package | Docs |\n|----------|---------| ------- | -----|\n| **CLI** | `cargo install lumis-cli` | [crates.io/lumis-cli](https://crates.io/crates/lumis-cli) | [README.md](crates/lumis-cli/README.md) |\n| **Rust** | `cargo add lumis` | [crates.io/lumis](https://crates.io/crates/lumis) | [README.md](crates/lumis/README.md) \u0026bull; [docs.rs](https://docs.rs/lumis) |\n| **Elixir** | `{:lumis, \"~\u003e 0.3\"}` | [hex.pm/lumis](https://hex.pm/packages/lumis) | [README.md](packages/elixir/lumis/README.md) \u0026bull; [hexdocs](https://hexdocs.pm/lumis) |\n| **JavaScript** | `npm install @lumis-sh/lumis` | [npmjs.com/@lumis-sh/lumis](https://www.npmjs.com/package/@lumis-sh/lumis) | [README.md](packages/javascript/lumis/README.md) |\n| **Browsers / CDN** | `npm install @lumis-sh/lumis` | [npmjs.com/@lumis-sh/lumis](https://www.npmjs.com/package/@lumis-sh/lumis) | [README.md](packages/javascript/lumis/README.md) |\n| **Java** | `io.roastedroot:lumis4j:0.0.7` | [io.roastedroot/lumis4j](https://central.sonatype.com/artifact/io.roastedroot/lumis4j) | [README.md](https://github.com/roastedroot/lumis4j/blob/main/README.md) |\n\n## Architecture\n\nEvery Lumis package is built around the same three pieces:\n\n- themes extracted from Neovim\n- languages backed by Tree-sitter grammars\n- formatters that turn highlighted tokens into output\n\nGiven some source code, Lumis parses it with the selected Tree-sitter language, resolves styles from the chosen theme, and then formats the highlighted result into HTML, ANSI, or any custom output.\n\n### WASM Versions\n\nThe npm [WASM package](https://www.npmjs.com/search?q=keywords:lumis-sh) versions follow the pattern `\u003ctree-sitter-version\u003e.\u003cseq\u003e` where:\n\n- `tree-sitter-version` is the major-minor version of the compatible Tree-sitter release\n- `seq` is a patch number for Lumis own updates\n\nFor example, `@lumis-sh/wasm-rust@0.26.0` is the first published version compatible with Tree-sitter 0.26,\nwhile `@lumis-sh/wasm-javascript@0.26.1` is a patch update compatible with Tree-sitter 0.26 (usually containing upstream parser updates).\n\n## Contributing\n\nContributions are welcome. Feel free to open issues or PRs for bugs, features, new themes, or languages.\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## Acknowledgements\n* [Makeup](https://hex.pm/packages/makeup) for setting up the baseline for the Elixir package\n* [Inkjet](https://crates.io/crates/inkjet) for the Rust implementation in the initial versions\n* [Shiki](https://shiki.style) and [syntect](https://crates.io/crates/syntect) for the hard work defining how syntax highlighters should work\n\n## License\n\nMIT\n","funding_links":["https://github.com/sponsors/leandrocp"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandrocp%2Flumis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleandrocp%2Flumis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleandrocp%2Flumis/lists"}