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 false
AND(condition1, condition2, ...) - Returns true if all conditions are true
OR(condition1, condition2, ...) - Returns true if any condition is true
NOT(condition) - Negates a condition
Text Functions
LEN(text) - Returns the length of text
CONCAT(text1, text2, ...) - Concatenates multiple text values
CONCATENATE(text1, text2, ...) - Alias for CONCAT
UPPER(text) - Converts text to uppercase
LOWER(text) - Converts text to lowercase
TRIM(text) - Removes leading and trailing spaces
REPLACE(old_text, start_num, num_chars, new_text) - Replaces part of a text string
Math Functions
SUM(a, b, ...) - Adds multiple numbers
AVG(a, b, ...) - Returns the average of multiple numbers
MIN(a, b, ...) - Returns the minimum value
MAX(a, b, ...) - Returns the maximum value
ROUND(number, digits) - Rounds a number to specified decimal places
ROUNDDOWN(number, num_digits) - Rounds a number down
ROUNDUP(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')
Utility Functions
GET(object, key) - Gets a value from an object or array
Usage
- Create or open a file with
.uqf extension
- Start typing formulas beginning with
=
- Hover over function names to see parameter documentation
- Use indentation to continue formulas on multiple lines
=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
| |