A comprehensive VS Code extension for the North52 Formula Manager language, providing syntax highlighting, validation, formatting, and IntelliSense support.
Features
🎨 Syntax Highlighting
- Color-coded functions, strings, field references, and operators
- Highlights field references like
[account.name]
- Recognizes GUIDs, booleans, and numeric values
- Comments support (
// and /* */)
✅ Real-time Validation
- Detects unmatched brackets (parentheses, brackets, braces)
- Identifies missing or extra commas in function calls
- Warns about empty function arguments
- Catches unterminated strings
- Shows helpful error messages with squiggly underlines
- Smart indentation for nested functions
- Automatic line breaking for long expressions
- Consistent spacing around operators and commas
- Use
Shift+Alt+F (Windows) or Shift+Option+F (Mac) to format
💡 IntelliSense
- Auto-complete function names as you type
- 539+ North52 functions from the official reference
- Snippet support with parameter placeholders
- Context-aware suggestions
📖 Documentation
- Hover over functions to see descriptions, signatures, and examples
- Parameter hints while typing function calls
- Shows required vs optional parameters
- Category information for each function
Installation
Method 1: Install from VSIX (Recommended)
- Open the extension folder in VS Code
- Open terminal (`Ctrl+``)
- Run the following commands:
npm install
npm run compile
npm run package
- Install the generated
.vsix file:
- Press
Ctrl+Shift+P (Windows) or Cmd+Shift+P (Mac)
- Type "Extensions: Install from VSIX"
- Select the generated
north52-formula-language-0.0.1.vsix file
Method 2: Development Mode
- Open the extension folder in VS Code
- Press
F5 to launch Extension Development Host
- Create or open a
.n52 or .north52 file to test
Usage
Creating North52 Files
- Create a new file with extension
.n52 or .north52
- Start typing North52 formulas
- The extension will automatically activate
Quick Start Example
// Simple if statement
if([account.revenue] > 100000, 'High Value', 'Standard')
// Nested functions with formatting
MultipleClientSide(
SetClientSideField('lastname', 'Test'),
DisableFields('firstname', 'lastname'),
ClearFields('description')
)
// Field references
Alert('Account: ' + [account.name])
Using IntelliSense
- Start typing a function name (e.g.,
Alert)
- Press
Ctrl+Space to trigger suggestions
- Select from the list and press
Enter
- Use
Tab to jump between parameter placeholders
- Right-click in the editor
- Select "Format Document"
- Or use the keyboard shortcut:
- Windows:
Shift+Alt+F
- Mac:
Shift+Option+F
- Linux:
Ctrl+Shift+I
Configuration
Customize the extension in VS Code settings:
{
"north52.formatter.indentSize": 2,
"north52.formatter.maxLineLength": 80,
"north52.validation.enabled": true
}
Supported Language Features
- Functions: All 539 North52 functions
- Field References:
[entity.field] syntax
- Strings: Single and double quotes
- Numbers: Integers, decimals, and percentages
- Booleans:
true, false
- Operators:
=, !=, <, >, <=, >=, +, -, *, /, %, &&, ||
- GUIDs:
{00000000-0000-0000-0000-000000000000}
- Comments:
// line comments and /* */ block comments
Categories
The extension includes functions from all North52 categories:
- Client Side (75 functions)
- Conversions (14 functions)
- Date (66 functions)
- Find Operations (34 functions)
- HTML (11 functions)
- Industry (17 functions)
- JSON (12 functions)
- Logical (18 functions)
- Loop (13 functions)
- Math (14 functions)
- Platform Operations (18 functions)
- Record Control (23 functions)
- Regular Expressions (3 functions)
- Rest Services (11 functions)
- SharePoint Services (13 functions)
- String (52 functions)
- System (96 functions)
- Web Services (15 functions)
- XML (8 functions)
- xCache (11 functions)
Troubleshooting
Extension Not Activating
- Ensure file extension is
.n52 or .north52
- Check the Output panel (View → Output) for errors
- Try reloading VS Code (
Ctrl+R)
IntelliSense Not Working
- Make sure the language is set to "North52" (bottom right corner)
- Try triggering manually with
Ctrl+Space
- Check that validation is enabled in settings
- Ensure the document is saved as a North52 file
Known Issues
- Very long lines (>1000 characters) may slow down validation
- Field reference completion is generic (doesn't know your CRM schema)
Contributing
Found a bug or have a feature request? Please open an issue!
Version History
0.0.1 (Initial Release)
- Syntax highlighting
- Bracket and comma validation
- Auto-formatting
- IntelliSense with 539+ functions
- Hover documentation
- Signature help
Credits
Function reference data sourced from North52 Support
License
MIT License - feel free to use and modify!
Enjoy writing North52 formulas in VS Code! 🚀