Picasso Language Support for VS Code
Full-featured IntelliSense extension for the Picasso programming language (.pic files).
Features
🎨 Syntax Highlighting
- Complete syntax highlighting for Picasso language constructs
- Keywords:
say, fn, class, using, return, this, new, foreach, thread
- Types:
int, string, float, bool, atomic int, atomic float
- Operators, strings, numbers, and comments
- Special highlighting for thread operations and atomic types
💡 IntelliSense & Auto-completion
- Keyword completion with documentation
- Type suggestions for all Picasso types
- Built-in module suggestions (
builtin/syncio, builtin/io, builtin/thread)
- Smart snippets for common patterns
- Context-aware completions
📝 Code Snippets
Type these prefixes and press Tab:
| Prefix |
Description |
class |
Complete class template |
classinternal |
Class with internal fields |
fn |
Function declaration |
fnret |
Function with return |
say |
Variable declaration |
atomic |
Atomic variable |
foreach |
Foreach loop |
thread |
Thread execution |
using |
Import statement |
printf |
Printf statement |
worker |
Worker class pattern |
threadpool |
Thread pool pattern |
program |
Full program template |
🔍 Advanced Features
- Hover Documentation: Hover over keywords and types for detailed information
- Go to Definition: Jump to class and function definitions (F12)
- Document Symbols: View outline of classes and functions (Ctrl+Shift+O)
- Signature Help: Parameter hints for function calls
- Code Folding: Fold/unfold code blocks
- Auto-closing Pairs: Automatic closing of brackets, quotes, and braces
- Smart Indentation: Automatic indentation for code blocks
- Comment Toggling: Quick line and block comments (Ctrl+/)
Picasso Language Syntax
Basic Example
using "builtin/syncio";
class Worker {
say internal id: int;
say c: atomic int;
say d: string = "hello";
fn Worker(id: int) {
this.id = id;
}
fn work() {
syncio.printf("Worker %d is working\n", this.id);
}
fn greet(): string {
return "hello";
}
}
fn start() {
foreach i in 0..10 {
say worker: start.Worker = new start.Worker(i);
thread(worker.work);
}
}
Language Features
Variable Declaration
say name: string = "John";
say age: int = 25;
say counter: atomic int = 0; // Thread-safe
Classes
class MyClass {
say internal field: int;
fn MyClass(value: int) {
this.field = value;
}
fn method(): void {
// method body
}
}
Functions
fn calculate(x: int, y: int): int {
return x + y;
}
Loops
foreach i in 0..10 {
// loop body
}
Threading
thread(worker.work); // Execute in separate thread
Imports
using "builtin/syncio";
using "builtin/io";
Installation
- Install from VS Code Marketplace
- Open any
.pic file
- Start coding with full IntelliSense support!
Usage Tips
- Quick Class Creation: Type
class and press Tab for a complete class template
- Thread Pool Pattern: Type
threadpool for a ready-to-use threading pattern
- Hover for Help: Hover over any keyword to see documentation
- Go to Definition: Ctrl+Click (Cmd+Click on Mac) on any class or function name
- View Outline: Press Ctrl+Shift+O to see all classes and functions
Keyboard Shortcuts
- Toggle Comment:
Ctrl+/ (Cmd+/ on Mac)
- Go to Definition:
F12
- Peek Definition:
Alt+F12
- Show All Symbols:
Ctrl+Shift+O
- Format Document:
Shift+Alt+F
Extension Settings
This extension contributes the following settings:
- Language ID:
pica-sso
- File Extension:
.pic
- Scope Name:
source.picasso
Known Issues
None at this time. Please report issues on the GitHub repository.
Release Notes
1.6.0
- ✨ Complete IntelliSense implementation
- 📝 Comprehensive code snippets (25+ snippets)
- 🎨 Enhanced syntax highlighting
- 🔍 Go to definition support
- 📋 Document symbols and outline view
- 💡 Hover documentation
- ⚡ Signature help for functions
- 🔧 Smart indentation and auto-closing pairs
- 📖 Full documentation
1.5.0
- Basic syntax highlighting
- Initial language support
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Support
For issues, questions, or suggestions:
Enjoy coding in Picasso! 🎨