Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>T-RubyNew to Visual Studio Code? Get it now.
T-Ruby

T-Ruby

t-ruby

|
3 installs
| (0) | Free
T-Ruby language support with type annotations for Ruby
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

T-Ruby for Visual Studio Code

TypeScript-style type annotations for Ruby.

Features

  • Syntax Highlighting - Full support for .trb and .d.trb files
  • IntelliSense - Autocomplete for types, methods, and variables
  • Diagnostics - Real-time type error reporting
  • Go to Definition - Jump to type and method definitions
  • Hover Information - See type information on hover
  • Find References - Find all usages of types and methods

Requirements

  • T-Ruby compiler (trc) must be installed and available in your PATH
gem install t-ruby

Quick Start

  1. Install the extension
  2. Open a .trb file
  3. Start coding with types!
# hello.trb
def greet(name: String): String
  "Hello, #{name}!"
end

type User = { name: String, age: Integer }

interface Printable
  def print(): void
end

Extension Settings

Setting Default Description
t-ruby.lspPath trc Path to the T-Ruby compiler executable
t-ruby.enableLSP true Enable Language Server Protocol support
t-ruby.diagnostics.enable true Enable real-time diagnostics
t-ruby.completion.enable true Enable autocomplete suggestions

Commands

  • T-Ruby: Compile Current File - Compile the active .trb file to .rb
  • T-Ruby: Generate Declaration File - Generate .d.trb declaration file
  • T-Ruby: Restart Language Server - Restart the LSP server

Learn More

  • T-Ruby Documentation
  • Language Specification

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft