Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pict Syntax HighlightingNew to Visual Studio Code? Get it now.
Pict Syntax Highlighting

Pict Syntax Highlighting

Lianting Wang

|
22 installs
| (0) | Free
Syntax highlighting, basic snippets, and language configuration for Pict (π-calculus based language).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pict-Syntax-Highlighting

Minimal but practical syntax highlighting and snippets for the Pict language (π-calculus style).

Features

Syntax Highlighting

  • Block comments {- … -}
  • Keywords: run new def and type val if then else import
  • Numbers (Int & Float — need import "Std/Float")
  • Strings, chars, and operators ! ? | = ; @
  • Record labels and method names (including symbolic ones like + =, == =) highlighted inside [ ... ]
  • Type modifiers: channel ^T, responsive /T

Snippets

Basic Syntax Templates

  • def – Define a process or server
  • new – Create a channel
  • run – Launch a concurrent block
  • if – Conditional structure

Standard Library Call Templates

Now includes English-style call templates for the standard library modules:

Module Example Call Snippet Description
Int (int.+ (1) (2)) Integer arithmetic & comparisons
Float (float.== (float.fromInt 1) (float.fromInt 2)) Floating-point arithmetic, comparison, trigonometric functions
Char (char.isAlpha ('a')) Character tests and conversions
String (string.split (",") ("a,b,c")) String manipulation & conversion
List (list.fold (xs) \(x acc) = (nextAcc) (initAcc)) List construction, traversal & folding

Each snippet shows the call form and parameter placeholders (e.g., left, right, or default arguments) for faster writing and clearer semantics.

Modular Snippet Organization

Snippets are now organized into multiple JSON files under the snippets/ folder:


snippets/
├─ base.json      ← basic syntax snippets (def/new/run/if)
├─ int.json       ← integer operation templates
├─ float.json     ← float operation templates
├─ char.json      ← character operation templates
├─ string.json    ← string operation templates
└─ list.json      ← list operation templates

All are declared in package.json so they load automatically.


File Associations

  • .pi

Install (from VSIX)

  1. Open VS Code → Extensions (Ctrl/Cmd+Shift+X).
  2. Click … (More) → Install from VSIX…
  3. Choose the packaged .vsix file or unzip the release folder into
    ~/.vscode/extensions/pict-syntax-highlighting.

Sample

Try sample/test.pict to verify syntax colors and snippet expansions.


Tuning & Extension

If you want more precise highlighting (e.g., typed parameters, booleans encoded via channels, Nomadic Pict keywords), extend
syntaxes/pict.tmLanguage.json with additional patterns.

To add or modify snippets, simply edit files under snippets/ or add new ones in the same format — VS Code merges them automatically.

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