Lof Language Support for VS Code
Provides syntax highlighting and language support for the Lof zero-knowledge proof language.
Features
- Syntax highlighting for all Lof language constructs
- Auto-closing brackets, parentheses, and braces
- Comment toggling with
Ctrl+/ (or Cmd+/ on macOS)
- Code folding support
- Bracket matching
Installation
From Source
- Clone the repository
- Copy the
vscode-extension directory to your VS Code extensions folder:
- Windows:
%USERPROFILE%\.vscode\extensions\lof-language
- macOS:
~/.vscode/extensions/lof-language
- Linux:
~/.vscode/extensions/lof-language
- Reload VS Code
From VSIX Package
- Build the extension:
vsce package (requires vsce CLI tool)
- Install:
code --install-extension lof-language-0.1.0.vsix
Supported Syntax
- Keywords:
proof , component , type , enum , match , with , let , in , assert , verify , where , refined
- Visibility modifiers:
input , witness , output
- Types:
field , bool , nat , bits , array
- Operators:
=== (constraint equality), == , != , < , > , <= , >= , && , || , ! , + , - , * , / , =>
- Comments:
// line comments
- Pattern matching with
| and =>
- Generic parameters with
<T, N>
Example
// Simple multiplication proof
proof Multiply {
input a: field;
input b: field;
witness c: field;
output result: field;
c === a * b;
result === c
}
// Function definition
let square (x: field): field = x * x
// Pattern matching
match value with
| 0 => "zero"
| 1 => "one"
| n => "other"
License
MIT
| |