Sublime Text
The official LUMOS package for Sublime Text provides syntax highlighting, snippets, and LSP integration.
Installation
Section titled “Installation”Package Control (Coming Soon)
Section titled “Package Control (Coming Soon)”Once available on Package Control:
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Select “Package Control: Install Package”
- Search for “LUMOS”
- Press Enter to install
Manual Installation
Section titled “Manual Installation”# Navigate to Packages directory# macOScd ~/Library/Application\ Support/Sublime\ Text/Packages
# Linuxcd ~/.config/sublime-text/Packages
# Windowscd %APPDATA%\Sublime Text\Packages
# Clone the repositorygit clone https://github.com/getlumos/sublime-lumos LUMOSRequirements
Section titled “Requirements”- Sublime Text 4 (or 3 build 3103+)
- LSP package (optional, for IntelliSense)
- lumos-lsp (optional, for LSP features)
Terminal window cargo install lumos-lsp
Features
Section titled “Features”Syntax Highlighting
Section titled “Syntax Highlighting”Complete syntax highlighting for .lumos files:
- Keywords and type declarations
- Attributes and decorators
- Comments (line and block)
- String literals and numbers
Code Snippets
Section titled “Code Snippets”Built-in snippets:
| Trigger | Description |
|---|---|
struct | Account struct template |
enum | Enum definition |
acc | Account with common fields |
type | Type alias |
dep | Deprecated attribute |
Auto-indentation
Section titled “Auto-indentation”Smart indentation for:
- Struct and enum bodies
- Field declarations
- Nested blocks
Comment Toggling
Section titled “Comment Toggling”Ctrl+/- Toggle line commentCtrl+Shift+/- Toggle block comment
LSP Setup
Section titled “LSP Setup”Install LSP Package
Section titled “Install LSP Package”- Install via Package Control: “LSP”
- Install lumos-lsp:
Terminal window cargo install lumos-lsp
Configure LSP
Section titled “Configure LSP”Create or edit LSP.sublime-settings:
{ "clients": { "lumos": { "enabled": true, "command": ["lumos-lsp"], "selector": "source.lumos", "schemas": [] } }}Or use the provided LSP-lumos.sublime-settings from the package.
Configuration
Section titled “Configuration”Package Settings
Section titled “Package Settings”Edit LUMOS.sublime-settings:
{ // Tab size for .lumos files "tab_size": 4,
// Use spaces instead of tabs "translate_tabs_to_spaces": true,
// Auto-complete brackets "auto_match_enabled": true}File Associations
Section titled “File Associations”Already configured in the package. To add custom patterns:
Preferences > Settings:
{ "file_extensions": { "lumos": ["lumos", "schema"] }}Troubleshooting
Section titled “Troubleshooting”Syntax not highlighting
Section titled “Syntax not highlighting”- Check file extension is
.lumos - Verify package is installed:
Preferences > Package Control > List Packages - Set syntax manually:
View > Syntax > LUMOS
LSP not working
Section titled “LSP not working”- Verify LSP package is installed
- Check lumos-lsp is on PATH:
Terminal window lumos-lsp --version - Check LSP logs:
View > LSP > Log Panel