README.md
December 21, 2025 · View on GitHub
T-Ruby for JetBrains IDEs
Official Website • GitHub • JetBrains Marketplace
T-Ruby language support for JetBrains IDEs. Provides syntax highlighting, LSP-based code intelligence, and development tools for T-Ruby - a TypeScript-style static type system for Ruby.
Note: This plugin works with all JetBrains IDEs including IntelliJ IDEA, RubyMine, WebStorm, and more.
Supported IDEs
- IntelliJ IDEA 2024.2+ (Ultimate & Community)
- RubyMine 2024.2+
- WebStorm 2024.2+
- PyCharm 2024.2+
- GoLand 2024.2+
- And other JetBrains IDEs based on IntelliJ Platform 2024.2+
Features
- Syntax highlighting for
.trband.d.trbfiles - LSP-based code intelligence (via LSP4IJ):
- Real-time diagnostics (type errors)
- Autocomplete suggestions
- Go to definition
- Hover information
- Actions:
Compile T-Ruby File(Ctrl+Shift+T / Cmd+Shift+T)Generate Declaration File(Ctrl+Shift+D / Cmd+Shift+D)
Requirements
- T-Ruby Compiler (
trc) must be installed and available in your PATH - LSP4IJ plugin (will be installed automatically as dependency)
gem install t-ruby
Installation
Install from the JetBrains Marketplace:
- Open your JetBrains IDE
- Go to Settings/Preferences → Plugins
- Search for "T-Ruby"
- Click Install
Configuration
Configure the T-Ruby compiler path in: Settings/Preferences → Tools → T-Ruby
| Setting | Default | Description |
|---|---|---|
trc Path | trc | Path to the T-Ruby compiler executable |
Enable LSP | true | Enable Language Server Protocol support |
Enable Diagnostics | true | Enable real-time diagnostics |
Enable Completion | true | Enable autocomplete suggestions |
Compatibility
| Plugin Version | T-Ruby Compiler | JetBrains IDEs |
|---|---|---|
| 0.1.x | >= 0.0.30 | 2024.2 - 2025.4 |
Building from Source
# Build the plugin
./gradlew buildPlugin
# Run IDE with plugin for testing
./gradlew runIde
# Run tests
./gradlew test
Development
Quick Iteration (Hot Reload)
For rapid development with automatic rebuilds:
./scripts/dev.sh
This starts the IDE and watches for file changes. When you save a file, the plugin rebuilds automatically and reloads in the running IDE.
Requirements: fswatch (brew install fswatch)
Quick Start Example
- Create a new file
hello.trb:
type UserId = String
interface User
id: UserId
name: String
age: Integer
end
def greet(user: User): String
"Hello, #{user.name}!"
end
-
Save the file - you'll see syntax highlighting and real-time diagnostics
-
Hover over types to see their definitions
-
Use
Ctrl+Spacefor autocomplete suggestions
Troubleshooting
Plugin not working
- Check if
trcis installed:which trc - Verify the path in settings:
Settings>Tools>T-Ruby - Check IDE logs:
Help>Show Log in Finder/Explorer
No syntax highlighting
- Ensure file has
.trbor.d.trbextension - Check file type association:
Settings>Editor>File Types
Performance issues
- Disable diagnostics for large files
- Restart the IDE
Contributing
Issues and pull requests are welcome! https://github.com/type-ruby/t-ruby-jetbrains/issues
Related
- T-Ruby Compiler - The main T-Ruby compiler
- T-Ruby VS Code - VS Code extension
- T-Ruby Vim - Vim/Neovim plugin
License
MIT