{"id":35319877,"url":"https://github.com/getlumos/tree-sitter-lumos","last_synced_at":"2026-04-09T02:01:22.358Z","repository":{"id":325764297,"uuid":"1102294276","full_name":"getlumos/tree-sitter-lumos","owner":"getlumos","description":"Tree-sitter grammar for LUMOS schema language","archived":false,"fork":false,"pushed_at":"2025-12-12T17:18:24.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-14T08:02:30.895Z","etag":null,"topics":["borsh","code-generation","developer-tools","editor","grammar","lumos","neovim","nvim-treesitter","parser","parsing","rust","schema-language","solana","syntax","syntax-highlighting","tree-sitter","treesitter","type-safety","typescript","vscode"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlumos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":null,"dco":null,"cla":null}},"created_at":"2025-11-23T07:21:09.000Z","updated_at":"2025-12-12T17:18:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/getlumos/tree-sitter-lumos","commit_stats":null,"previous_names":["getlumos/tree-sitter-lumos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getlumos/tree-sitter-lumos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Ftree-sitter-lumos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Ftree-sitter-lumos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Ftree-sitter-lumos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Ftree-sitter-lumos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlumos","download_url":"https://codeload.github.com/getlumos/tree-sitter-lumos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Ftree-sitter-lumos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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":["borsh","code-generation","developer-tools","editor","grammar","lumos","neovim","nvim-treesitter","parser","parsing","rust","schema-language","solana","syntax","syntax-highlighting","tree-sitter","treesitter","type-safety","typescript","vscode"],"created_at":"2025-12-30T21:03:00.713Z","updated_at":"2026-04-09T02:01:22.353Z","avatar_url":"https://github.com/getlumos.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-sitter-lumos\n\nTree-sitter grammar for [LUMOS](https://lumos-lang.org) - a type-safe schema language for Solana development.\n\n## Features\n\n- **Fast parsing**: Incremental, error-tolerant parsing\n- **Syntax highlighting**: Accurate highlighting for all LUMOS syntax\n- **Editor integration**: Works with Neovim, Emacs, and other Tree-sitter-enabled editors\n- **Complete coverage**: Supports structs, enums, attributes, all types, and comments\n\n## Installation\n\n### Neovim (with nvim-treesitter)\n\n```lua\n{\n  \"nvim-treesitter/nvim-treesitter\",\n  opts = {\n    ensure_installed = { \"lumos\" },\n  },\n}\n```\n\n### Manual Installation\n\n```bash\ngit clone https://github.com/getlumos/tree-sitter-lumos\ncd tree-sitter-lumos\nnpm install\nnpm run build\n```\n\n## Development\n\n### Prerequisites\n\n- Node.js (v16+)\n- npm\n- tree-sitter-cli\n\n### Setup\n\n```bash\n# Install dependencies\nnpm install\n\n# Generate parser\nnpm run build\n\n# Run tests\nnpm test\n\n# Parse a file\nnpm run parse examples/player.lumos\n```\n\n### Project Structure\n\n```\ntree-sitter-lumos/\n├── grammar.js           # Grammar definition\n├── queries/\n│   └── highlights.scm   # Syntax highlighting queries\n├── test/\n│   └── corpus/          # Test cases\n│       ├── struct.txt   # Struct tests\n│       └── enum.txt     # Enum tests\n├── src/                 # Generated parser (C code)\n└── bindings/            # Language bindings\n```\n\n## Grammar Coverage\n\n### Supported Syntax\n\n- **Structs**: With fields and attributes\n  ```lumos\n  #[solana]\n  #[account]\n  struct Player {\n      wallet: PublicKey,\n      score: u64,\n  }\n  ```\n\n- **Enums**: Unit, tuple, and struct variants\n  ```lumos\n  enum GameState {\n      Active,\n      Paused,\n      Finished(u64),\n      Custom { reason: String },\n  }\n  ```\n\n- **Types**:\n  - Primitives: `u8`, `u16`, `u32`, `u64`, `u128`, `i8`-`i128`, `bool`, `String`\n  - Solana types: `PublicKey`, `Signature`\n  - Complex: `Vec\u003cT\u003e`, `Option\u003cT\u003e`, `[T]`\n\n- **Attributes**: `#[solana]`, `#[account]`, custom attributes with values\n\n- **Comments**: Line (`//`) and block (`/* */`)\n\n## Testing\n\nRun the test suite:\n\n```bash\nnpm test\n```\n\nAdd new test cases in `test/corpus/`:\n\n```\n================\nTest name\n================\n\n\u003cLUMOS code\u003e\n\n---\n\n\u003cExpected parse tree\u003e\n```\n\n## Integration\n\n### Neovim\n\nUse with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter):\n\n```lua\nrequire('nvim-treesitter.configs').setup({\n  ensure_installed = { \"lumos\" },\n  highlight = { enable = true },\n})\n```\n\n### Emacs\n\nUse with [tree-sitter-mode](https://github.com/emacs-tree-sitter/tree-sitter-mode)\n\n### Helix\n\nAdd to `languages.toml`:\n\n```toml\n[[language]]\nname = \"lumos\"\nscope = \"source.lumos\"\nfile-types = [\"lumos\"]\nroots = []\ncomment-token = \"//\"\ngrammar = \"lumos\"\n```\n\n## Contributing\n\nContributions welcome! Please:\n\n1. Add test cases for new syntax\n2. Run `npm test` before submitting\n3. Update README if adding features\n\n## Resources\n\n- [LUMOS Documentation](https://docs.lumos-lang.org)\n- [Tree-sitter Documentation](https://tree-sitter.github.io/tree-sitter/)\n- [Neovim Plugin](https://github.com/getlumos/nvim-lumos)\n\n## License\n\nDual-licensed under MIT OR Apache-2.0\n\n---\n\n**Part of the [LUMOS](https://lumos-lang.org) ecosystem** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlumos%2Ftree-sitter-lumos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlumos%2Ftree-sitter-lumos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlumos%2Ftree-sitter-lumos/lists"}