Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Monk LanguageNew to Visual Studio Code? Get it now.
Monk Language

Monk Language

Monk From Earth

|
18 installs
| (0) | Free
Complete language support for Monk - a modern statically-typed language with memory safety, powerful built-ins, and professional development tools including linting and formatting
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Monk Language VS Code Extension

Complete language support for Monk - a modern statically-typed language with memory safety, powerful built-ins, and professional development tools.

Features

🎨 Comprehensive Syntax Highlighting

  • Full syntax highlighting for .monk and .mnk files
  • Support for Monk code blocks in Markdown files
  • Enhanced highlighting for v0.0.6 features:
    • Optional types with ? syntax
    • Module imports with as aliases
    • Template literals with interpolation
    • Type annotations and declarations
    • All built-in functions and operators

📝 Rich Code Snippets

Over 30 intelligent code snippets for:

  • Variable declarations (let, const, lett, letopt)
  • Function definitions (func, funcp, asyncfunc)
  • Control flow structures (if, while, for)
  • Type declarations (type, typeopt)
  • Module imports (use, useas)
  • Error handling (guard, guardlet)
  • Array operations (map, filter, reduce)
  • And much more!

🛠️ Development Tools Integration

  • Context menu commands for formatting and linting
  • Keyboard shortcuts for common operations
  • Configuration options for development tools
  • Support for strict mode and enhanced static analysis

📋 IntelliSense Features

  • Smart auto-closing pairs for brackets, quotes, and template literals
  • Intelligent indentation rules
  • Code folding support
  • Word pattern recognition for better text manipulation

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Monk Language"
  4. Click Install

Manual Installation

  1. Download the .vsix file from releases
  2. Open VS Code
  3. Press Ctrl+Shift+P and type "Extensions: Install from VSIX"
  4. Select the downloaded file

Usage

Basic Syntax Highlighting

The extension automatically provides syntax highlighting for .monk and .mnk files:

// Variables with type inference
let name = "Monk Language"
let version = 0.06

// Type annotations (space-separated syntax)
let count int = 42
let active boolean = true

// Optional types (v0.0.6)
let optional_value int? = 42
optional_value = none

// Type declarations
type User = {
    id: int,
    name: string,
    email: string?
}

Code Snippets

Type any of these prefixes and press Tab:

  • let → Variable declaration
  • func → Function declaration
  • type → Type declaration
  • use → Module import
  • guard → Error handling
  • template → Template literal

Markdown Support

Monk code blocks in Markdown files are fully highlighted:

```monk
let greet = (name string) string {
    return `Hello, ${name}!`
}
```

Configuration

Extension Settings

Configure the extension in VS Code settings:

{
    "monk.linting.enabled": true,
    "monk.formatting.enabled": true,
    "monk.strictMode.enabled": false,
    "monk.executablePath": "monk"
}

Available Commands

  • Monk: Format Code (Shift+Alt+F) - Format current file
  • Monk: Lint Code - Run linting on current file
  • Monk: Run Script - Execute current Monk script

Language Features Supported

Core Language (v0.0.1-v0.0.5)

✅ Variables and constants
✅ Data types (int, string, float, bool, none)
✅ Arrays and records
✅ Functions with closures
✅ Control flow (if/else, while, for)
✅ Error handling (guard/against/throw)
✅ Module system (use/export)
✅ Template literals
✅ Built-in functions

Static Semantics (v0.0.6)

✅ Optional types with ? syntax
✅ First-assignment type inference
✅ Module import aliases
✅ Enhanced type annotations
✅ Borrow checker integration
✅ Strict mode support
✅ Professional development tools

Development Tools

The extension integrates with Monk's development tools:

Linting

monk lint --fix src/

Formatting

monk format src/

Strict Mode

monk run --strict script.monk

File Associations

The extension automatically activates for:

  • .monk files
  • .mnk files
  • Markdown files with Monk code blocks

Troubleshooting

Syntax Highlighting Not Working

  1. Ensure the file has a .monk or .mnk extension
  2. Reload VS Code (Ctrl+Shift+P → "Developer: Reload Window")
  3. Check that the extension is enabled

Snippets Not Appearing

  1. Verify that IntelliSense is enabled
  2. Check language mode in status bar (should show "Monk")
  3. Try typing snippet prefix and pressing Ctrl+Space

Markdown Code Blocks

Ensure fenced code blocks use monk or mnk language identifier:

```monk
// Your Monk code here
```

Contributing

Found a bug or want to request a feature?

  • Report Issues
  • Submit Pull Requests

Changelog

v0.0.6

  • ✨ Added comprehensive .mnk extension support
  • 🎨 Enhanced syntax highlighting for optional types
  • 📦 Added module import aliases highlighting
  • 🔧 Added 30+ code snippets
  • 🛠️ Integrated development tools support
  • 📋 Added configuration options
  • 🔄 Enhanced markdown code block support

v0.0.3

  • 🎨 Added markdown syntax highlighting
  • 📝 Improved TextMate grammar
  • 🔧 Enhanced auto-closing pairs

v0.0.2

  • 📦 Initial VS Code Marketplace release
  • 🎨 Basic syntax highlighting
  • 📋 Language configuration

License

MIT License - see LICENSE for details.

Links

  • Monk Language Repository
  • Documentation
  • Examples
  • Release Notes

Enjoy coding in Monk! 🐒

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