Lotus Language Extension for VS Code
Provides rich language support for the Lotus programming language.
Features
- Syntax Highlighting: Full TextMate grammar for
.lts files
- Code Snippets: Quick templates for common constructs (functions, structs, loops, etc.)
- Build Commands: Compile and run Lotus programs directly from VS Code
- Error Diagnostics: Real-time error highlighting as you code
- Hover Information: Documentation for keywords and types on hover
Commands
| Command |
Keybinding |
Description |
Lotus: Build Current File |
Ctrl+Shift+B |
Compile the current .lts file |
Lotus: Build and Run |
Ctrl+F5 |
Compile and execute the program |
Lotus: Generate Assembly |
- |
Output x86-64 assembly |
Snippets
| Prefix |
Description |
fn |
Function definition |
main |
Main entry point |
if / ife |
If / If-else statement |
for |
For loop |
while |
While loop |
loop |
Infinite loop |
struct |
Struct definition |
enum |
Enum definition |
class |
Class definition |
impl |
Implementation block |
use |
Module import |
let / letm |
Variable / Mutable variable |
const |
Constant declaration |
match |
Match expression |
asm |
Inline assembly block |
extern |
External function declaration |
Configuration
| Setting |
Default |
Description |
lotus.compilerPath |
lotus |
Path to the Lotus compiler |
lotus.showAssemblyOnBuild |
false |
Open assembly output after generation |
lotus.enableDiagnostics |
true |
Enable real-time error diagnostics |
Requirements
- Lotus compiler installed and available in PATH
- VS Code 1.85.0 or higher
Installation
From VSIX (Local)
- Build the extension:
npm run package
- Install:
code --install-extension lotus-lang-0.1.0.vsix
From Marketplace
Coming soon!
Development
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode
npm run watch
# Package
npm run package
License
MIT License - see LICENSE for details.
| |