{"id":48617137,"url":"https://github.com/getlumos/vscode-lumos","last_synced_at":"2026-04-09T02:12:31.258Z","repository":{"id":324853607,"uuid":"1098781181","full_name":"getlumos/vscode-lumos","owner":"getlumos","description":"Write once. Deploy Everywhere. | Official VSCode extension for LUMOS schema language","archived":false,"fork":false,"pushed_at":"2026-01-19T13:16:49.000Z","size":2058,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-19T19:43:09.590Z","etag":null,"topics":["developer-tools","language-support","lumos","schema-language","solana","syntax-highlighting","vscode-extension"],"latest_commit_sha":null,"homepage":"https://lumos-lang.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getlumos.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","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-18T06:13:14.000Z","updated_at":"2026-01-19T13:16:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/getlumos/vscode-lumos","commit_stats":null,"previous_names":["getlumos/vscode-lumos"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/getlumos/vscode-lumos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Fvscode-lumos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Fvscode-lumos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Fvscode-lumos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Fvscode-lumos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getlumos","download_url":"https://codeload.github.com/getlumos/vscode-lumos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getlumos%2Fvscode-lumos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581886,"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":["developer-tools","language-support","lumos","schema-language","solana","syntax-highlighting","vscode-extension"],"created_at":"2026-04-09T02:12:30.960Z","updated_at":"2026-04-09T02:12:31.197Z","avatar_url":"https://github.com/getlumos.png","language":"TypeScript","funding_links":[],"categories":["🎯 Official Resources"],"sub_categories":[],"readme":"# LUMOS Language Support for VSCode\n\n[![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/getlumos.lumos?label=VS%20Marketplace\u0026logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=getlumos.lumos)\n[![Visual Studio Marketplace Installs](https://img.shields.io/visual-studio-marketplace/i/getlumos.lumos?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=getlumos.lumos)\n[![Visual Studio Marketplace Rating](https://img.shields.io/visual-studio-marketplace/r/getlumos.lumos?logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=getlumos.lumos)\n[![GitHub](https://img.shields.io/github/license/getlumos/vscode-lumos)](LICENSE-MIT)\n\n\u003e **Write once. Deploy Everywhere.**\n\nOfficial VSCode extension for the LUMOS schema language - a type-safe, cross-language schema definition language for Solana development.\n\n**What is LUMOS?** A powerful code generation framework that eliminates the pain of maintaining duplicate type definitions across TypeScript and Rust in Solana development. Write your data structures once in `.lumos` syntax, and automatically generate perfectly synchronized code for both languages with guaranteed Borsh serialization compatibility.\n\n## Features\n\n### 🚀 Language Server Protocol\n\n**Full IDE support powered by `lumos-lsp`** - Production-ready language server integration:\n\n- ✅ **Real-time Diagnostics** - Instant feedback on syntax errors, undefined types, and schema validation\n- ✅ **Intelligent Auto-completion** - Context-aware suggestions for:\n  - Solana types (`PublicKey`, `Signature`, `Keypair`)\n  - Primitives (`u8`-`u128`, `i8`-`i128`, `bool`, `String`)\n  - Complex types (`Vec\u003cT\u003e`, `Option\u003cT\u003e`)\n  - Attributes (`#[solana]`, `#[account]`, `#[key]`, `#[max]`, `#[deprecated]`)\n  - Keywords (`struct`, `enum`)\n- ✅ **Hover Documentation** - Rich type information and inline documentation\n- ✅ **Auto-install** - One-click setup, no manual configuration needed\n- 🔄 **Future Features**: Go to definition, find references, rename symbol\n\nThe LUMOS Language Server is battle-tested with 142 passing tests and provides a seamless, production-ready IDE experience.\n\n### 🎨 Syntax Highlighting\nBeautiful syntax highlighting for `.lumos` files with support for:\n- Keywords (`struct`, `enum`, `pub`, etc.)\n- Primitive types (`u8`, `u64`, `String`, etc.)\n- Solana types (`PublicKey`, `Signature`, `Keypair`)\n- Attributes (`#[solana]`, `#[account]`, `#[key]`, `#[max(n)]`)\n- Comments (line and block)\n- Numbers (decimal, hex, binary, octal)\n\n### ✨ Smart Editing Features\n\n**Bracket Matching:**\n- Highlights matching `{}`, `[]`, `()`, `\u003c\u003e` pairs when cursor is adjacent\n- Jump to matching bracket with `Ctrl+Shift+\\` (Windows/Linux) or `Cmd+Shift+\\` (Mac)\n- Visual indicator for nested structures\n\n**Auto-Closing Pairs:**\n- Automatically closes `{`, `[`, `(`, `\u003c`, `\"` when typed\n- Works intelligently - skips auto-closing inside strings\n- Surrounds selected text when typing opening bracket\n\n**Smart Indentation:**\n- Auto-indents nested struct/enum definitions\n- Decreases indent when typing closing bracket\n- Handles multi-line field lists automatically\n\n**Code Folding:**\n- Fold/unfold code blocks with `Ctrl+Shift+[` and `Ctrl+Shift+]`\n- Support for `// #region` and `// #endregion` markers\n- Visual fold indicators in gutter\n\n**Example Usage:**\n\n```lumos\n// Type '{' and it auto-closes to '{}' with cursor inside\nstruct Player {|}  // Cursor positioned here automatically\n\n// Smart indentation for nested structures\nenum GameState {\n    Active {\n        players: Vec\u003cPublicKey\u003e,  // Automatic indentation\n        round: u32,               // Bracket matching highlights pairs\n    },\n    Paused,\n}\n\n// #region Core Types\nstruct Position { x: i32, y: i32 }\n// #endregion\n```\n\n### 📝 Code Snippets\nQuick snippets for common patterns:\n- `solstruct` - Solana struct\n- `solaccount` - Solana account struct\n- `enumu` - Unit enum (state machines)\n- `enumt` - Tuple enum (data-carrying variants)\n- `enums` - Struct enum (Solana instruction pattern)\n- Field shortcuts: `fpubkey`, `fu64`, `fstring`, `farray`, `foption`\n- Attributes: `max`, `key`\n\n### ⚡ Commands\n- **LUMOS: Generate Code** - Generate Rust and TypeScript from current schema\n- **LUMOS: Validate Schema** - Validate the current `.lumos` file\n\n### ⚙️ Settings\n- `lumos.validation.enabled` - Enable/disable schema validation (default: `true`)\n- `lumos.codeGeneration.autoGenerate` - Auto-generate code on save (default: `false`)\n\n## Requirements\n\n### Language Server (Auto-installed)\n\nThe LUMOS Language Server (`lumos-lsp`) provides real-time diagnostics, auto-completion, and hover documentation. **It will be automatically installed** when you first open a `.lumos` file - just click \"Install Now\" when prompted!\n\n**Manual Installation (Optional):**\n```bash\ncargo install lumos-lsp\n```\n\n### Code Generation CLI (Optional)\n\nFor code generation features (LUMOS: Generate Code command), install the CLI:\n\n```bash\ncargo install lumos-cli\n```\n\nOr build from source:\n```bash\ngit clone https://github.com/getlumos/lumos\ncd lumos\ncargo install --path packages/cli\n```\n\n## Usage\n\n### Creating a LUMOS Schema\n\n1. Create a new file with `.lumos` extension\n2. Start typing and enjoy syntax highlighting!\n3. Use snippets for quick scaffolding (e.g., type `solstruct` and press Tab)\n\nExample:\n```lumos\n#[solana]\n#[account]\nstruct UserAccount {\n    wallet: PublicKey,\n    balance: u64,\n    items: [PublicKey],\n}\n\n#[solana]\nenum GameState {\n    Active,\n    Paused,\n    Finished,\n}\n```\n\n### Type System\n\nLUMOS provides **guaranteed type-safe mapping** between Rust and TypeScript with full Borsh serialization compatibility:\n\n| LUMOS Type | Rust Output | TypeScript Output | Notes |\n|------------|-------------|-------------------|-------|\n| `u8`, `u16`, `u32` | `u8`, `u16`, `u32` | `number` | Safe for all values |\n| `u64`, `i64` | `u64`, `i64` | `number` | ⚠️ **Precision limit: 2^53-1** |\n| `u128`, `i128` | `u128`, `i128` | `bigint` | Full precision |\n| `bool` | `bool` | `boolean` | |\n| `String` | `String` | `string` | UTF-8 encoded |\n| `PublicKey` | `Pubkey` | `PublicKey` | Solana 32-byte address |\n| `Signature` | `Signature` | `Signature` | 64-byte Ed25519 signature |\n| `[T]` | `Vec\u003cT\u003e` | `T[]` | Dynamic-length array |\n| `Option\u003cT\u003e` | `Option\u003cT\u003e` | `T \\| undefined` | Nullable type |\n\n**Key Benefits:**\n- **Borsh Compatibility:** Data serialized in Rust deserializes perfectly in TypeScript (and vice versa)\n- **Precision Warnings:** Auto-generated JSDoc comments warn about JavaScript `number` precision limits for `u64`/`i64` fields\n- **Type Safety:** Compile-time guarantees that your schemas match across languages\n\n**Example with Precision Warning:**\n```typescript\n// Generated TypeScript (automatic JSDoc warning)\nexport interface UserAccount {\n  wallet: PublicKey;\n  /** WARNING: number in JS has precision limit of 2^53-1 (9007199254740991).\n   *  Values exceeding this will lose precision. For Solana lamports or large\n   *  values, consider validation. Original Rust type: u64 */\n  balance: number;\n  items: PublicKey[];\n}\n```\n\n**Learn More:**\n- [LUMOS Type System Documentation](https://github.com/getlumos/lumos#type-mapping)\n- [Borsh Specification](https://borsh.io/)\n\n### Generating Code\n\n**Option 1: Command Palette**\n1. Open a `.lumos` file\n2. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac)\n3. Type \"LUMOS: Generate Code\" and press Enter\n\n**Option 2: Auto-generate on Save**\n1. Enable in settings: `\"lumos.codeGeneration.autoGenerate\": true`\n2. Save your `.lumos` file\n3. Code is automatically generated!\n\n## Extension Settings\n\nThis extension contributes the following settings:\n\n**Language Server:**\n* `lumos.lsp.enable`: Enable/disable Language Server Protocol integration (default: `true`)\n* `lumos.lsp.path`: Custom path to lumos-lsp binary (default: `\"lumos-lsp\"`)\n* `lumos.lsp.autoInstall`: Automatically install lumos-lsp if not found (default: `true`)\n* `lumos.lsp.trace.server`: Debug LSP communication - `\"off\"`, `\"messages\"`, or `\"verbose\"` (default: `\"off\"`)\n\n**Code Generation:**\n* `lumos.validation.enabled`: Enable/disable LUMOS schema validation (default: `true`)\n* `lumos.codeGeneration.autoGenerate`: Automatically generate Rust/TypeScript on save (default: `false`)\n\n**Formatting:**\n* `lumos.format.indentSize`: Number of spaces for indentation - `2` or `4` (default: `4`)\n* `lumos.format.sortAttributes`: Sort attributes alphabetically (default: `true`)\n* `lumos.format.alignFields`: Align colons in struct fields (default: `true`)\n\n## Roadmap\n\n- [x] Syntax highlighting and code snippets\n- [x] Code generation commands\n- [x] Language Server Protocol server implementation ([getlumos/lumos#45](https://github.com/getlumos/lumos/issues/45))\n- [x] LSP integration into VSCode extension ([#1](https://github.com/getlumos/vscode-lumos/issues/1))\n- [x] Real-time diagnostics and auto-completion\n- [x] Hover documentation\n- [x] Bracket matching and smart editing features\n- [x] Type mapping reference documentation\n- [ ] Go to definition\n- [ ] Find references\n- [ ] Rename symbol\n\n**Track progress:** See [ROADMAP.md](ROADMAP.md) for detailed timeline\n\n## Release Notes\n\n### 0.1.0\n\nInitial release of LUMOS VSCode extension:\n- ✅ Syntax highlighting for `.lumos` files\n- ✅ Code snippets for common patterns\n- ✅ Bracket matching and auto-closing\n- ✅ Comment toggling\n- ✅ Code generation commands\n- ✅ Auto-generate on save option\n\n## Publishing\n\nThis extension is automatically published to the VS Code Marketplace via GitHub Actions when a new release is created.\n\n### Automated Publishing Workflow\n\nThe repository includes a GitHub Actions workflow that automatically:\n1. Compiles and lints the extension\n2. Packages the extension into a `.vsix` file\n3. Publishes to the VS Code Marketplace\n4. Uploads the `.vsix` artifact for download\n\n### Creating a New Release\n\nTo publish a new version:\n\n1. Update the version in `package.json`:\n   ```bash\n   npm version patch  # or minor, or major\n   ```\n\n2. Create a GitHub release:\n   ```bash\n   git tag v0.6.0\n   git push origin v0.6.0\n   gh release create v0.6.0 --title \"v0.6.0\" --notes \"Release notes here\"\n   ```\n\n3. The workflow will automatically publish to the marketplace within a few minutes.\n\n### Required Secret\n\nThe workflow requires a `VSCE_PAT` (Visual Studio Code Extensions Personal Access Token) secret to be configured in the repository settings.\n\n**To set up the secret:**\n1. Create a Personal Access Token at https://dev.azure.com with:\n   - Organization: All accessible organizations\n   - Scopes: `Marketplace (Manage)`\n2. Add the token as a repository secret named `VSCE_PAT` at:\n   https://github.com/getlumos/vscode-lumos/settings/secrets/actions\n\n### Manual Publishing\n\nTo manually trigger the workflow without creating a release:\n1. Go to Actions tab → \"Publish to VS Code Marketplace\"\n2. Click \"Run workflow\"\n3. Optionally specify a version or leave empty to use `package.json` version\n\n## Contributing\n\nFound a bug or have a feature request? Please open an issue on [GitHub](https://github.com/getlumos/vscode-lumos/issues).\n\n## Related Repositories\n\n- **LUMOS Core:** https://github.com/getlumos/lumos\n- **Language Server:** https://crates.io/crates/lumos-lsp\n- **Documentation:** https://github.com/getlumos/docs-lumos\n- **GitHub Action:** https://github.com/marketplace/actions/lumos-generate\n- **Awesome LUMOS:** https://github.com/getlumos/awesome-lumos\n\n## License\n\nMIT OR Apache-2.0\n\n---\n\n**Enjoy!** 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlumos%2Fvscode-lumos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetlumos%2Fvscode-lumos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetlumos%2Fvscode-lumos/lists"}