A VS Code extension that provides syntax highlighting, documentation, and multiline support for Unqork formulas in .uqf files.
Features
- Syntax Highlighting - Colorized keywords, strings, numbers, operators, and variables
- Function Documentation - Hover over any function to see parameters and descriptions
- Multiline Support - Write formulas across multiple lines with proper indentation
- String Highlighting - Supports both single (
') and double (") quoted strings
Supported Functions
Conditional Functions
IF(condition, trueValue, falseValue)- Returns one value if true, another if falseAND(condition1, condition2, ...)- Returns true if all conditions are trueOR(condition1, condition2, ...)- Returns true if any condition is trueNOT(condition)- Negates a condition
Text Functions
LEN(text)- Returns the length of textCONCAT(text1, text2, ...)- Concatenates multiple text valuesCONCATENATE(text1, text2, ...)- Alias for CONCATUPPER(text)- Converts text to uppercaseLOWER(text)- Converts text to lowercaseTRIM(text)- Removes leading and trailing spacesREPLACE(old_text, start_num, num_chars, new_text)- Replaces part of a text string
Math Functions
SUM(a, b, ...)- Adds multiple numbersAVG(a, b, ...)- Returns the average of multiple numbersMIN(a, b, ...)- Returns the minimum valueMAX(a, b, ...)- Returns the maximum valueROUND(number, digits)- Rounds a number to specified decimal placesROUNDDOWN(number, num_digits)- Rounds a number downROUNDUP(number, num_digits)- Rounds a number up
Date/Time Functions
MOMENT(dateObj, operation, value, unit)- Date/time manipulation using moment.js library- Examples:
=MOMENT(MOMENT(dateOne, 'subtract', 1, 'month'), 'format', 'YYYY-MM-DD')=MOMENT(MOMENT(MOMENT(MOMENT(), 'utc'), 'format', 'YYYY-MM-DDTHH:mm:ss.SSS')
- Examples:
Utility Functions
GET(object, key)- Gets a value from an object or array
Usage
- Create or open a file with
.uqfextension - Start typing formulas beginning with
= - Hover over function names to see parameter documentation
- Use indentation to continue formulas on multiple lines
Example Multiline Formula
=IF(LEN(firstName) > 0,
CONCAT(firstName, ' ', lastName),
'Unknown')
Release Notes
0.1.0
- Initial release with syntax highlighting for 20+ Unqork functions
- Hover documentation for all functions with parameter descriptions
- Multiline formula support with indentation
- String highlighting for single and double quotes