Rune Language Extension
A comprehensive VS Code extension for the Rune programming language, providing syntax highlighting, language support, and integrated code execution.
Features
Language Support
- 🎨 Syntax highlighting for Rune language
- 💬 Comment support with
#
- 🔧 Bracket matching and auto-closing
- 📐 Proper indentation
- 🎯 Custom file icons for
.rune
and .rn
files
Code Execution
- ▶️ Run Rune files directly in VS Code terminal
- 🎯 Execute selected code snippets
- 🖥️ Interactive terminal for direct Rune commands
- 📱 Full input/output support including user input prompts
- ⚡ Keyboard shortcuts for quick execution
- 🔍 Auto-discovery of Rune interpreter
Installation & Setup
- Install the extension in VS Code
- Ready to use! The Rune interpreter is bundled with the extension
- (Optional) Configure a custom interpreter path if needed:
- Open VS Code Settings (
Ctrl+,
)
- Search for "Rune interpreter"
- Set the path to your custom
rune.exe
file
Usage
Running Code
Method 1: Keyboard Shortcuts
- Run entire file:
Ctrl+F5
(Windows/Linux) or Cmd+F5
(Mac)
- Run selected code:
Ctrl+Shift+F5
(Windows/Linux) or Cmd+Shift+F5
(Mac)
- Open interactive terminal:
Ctrl+Shift+T
(Windows/Linux) or Cmd+Shift+T
(Mac)
Method 2: Command Palette
- Open Command Palette (
Ctrl+Shift+P
)
- Type "Rune: Run File", "Rune: Run Selection", or "Rune: Open Terminal"
- Right-click in editor → "Run Rune File" or "Open Rune Terminal"
- Right-click on file in Explorer → "Run Rune File"
- Click the ▶️ play button in the editor title bar
File Types
Save your files with .rune
or .rn
extension to activate language support.
Configuration Options
Setting |
Description |
Default |
rune.interpreterPath |
Path to Rune interpreter executable |
"" |
rune.terminalName |
Name for the Rune terminal |
"Rune Language" |
Language Features
Variables
set myVariable = "Hello World"
set number = 42
Functions
write("Hello, Rune!")
type(myVariable)
# This is a single-line comment
set x = 10 # Inline comment
Operators
- Arithmetic:
+
, -
, *
, /
, %
- Comparison:
==
, !=
, <
, >
, <=
, >=
- Assignment:
=
Booleans
set isTrue = yes
set isFalse = no
Example Rune Program
# Welcome to Rune Language!
set name = "Developer"
set age = 25
write("Hello, " + name + "!")
write("You are " + age + " years old.")
# Check if adult
set isAdult = age >= 18
write("Adult status: " + isAdult)
Terminal Output
When you run Rune code, it executes in VS Code's integrated terminal with full input/output support:
Running: example.rune
──────────────────────────────────────────────────
Hello, Developer!
You are 25 years old.
Enter your name: █ # You can type here!
Interactive Terminal
Use Ctrl+Shift+T
to open a dedicated Rune terminal where you can:
- Run Rune files directly:
rune.exe myfile.rune
- Test commands interactively
- Handle programs that require user input
- Debug your code step by step
Troubleshooting
Interpreter Not Found
If you see "Rune interpreter not found" (rare):
- The extension should work out-of-the-box with the bundled interpreter
- If using a custom interpreter, set the full path in settings:
rune.interpreterPath
- Or place your custom
rune.exe
in your workspace folder
Interpreter Search Priority
The extension searches for interpreters in this order:
- Bundled interpreter (included with extension) - highest priority
- Custom path from settings
- Current workspace folder
- Same directory as the Rune file
- Parent directory
- System PATH
Roadmap
- [ ] Debugging support
- [ ] IntelliSense and auto-completion
- [ ] Error diagnostics
- [ ] Code snippets
- [ ] Integrated terminal
- [ ] Test runner integration
Enjoy coding in Rune! 🚀