Syntax highlighting for the Facto programming language.
-
Copy/move this entire
facto-vscodefolder to your VS Code extensions directory:- Windows:
%USERPROFILE%\.vscode\extensions\ - macOS:
~/.vscode/extensions/ - Linux:
~/.vscode/extensions/
- Windows:
-
Restart VS Code (or run "Developer: Reload Window" from the command palette)
-
Open any
.factofile — syntax highlighting should work immediately!
-
Install vsce (VS Code Extension manager):
npm install -g @vscode/vsce
-
Package the extension:
cd facto-vscode vsce package -
This creates
facto-0.2.0.vsix. Install it via:- VS Code → Extensions → "..." menu → "Install from VSIX..."
- Or:
code --install-extension facto-0.2.0.vsix
- Keywords:
func,return,import,as,when - Types:
int,Signal,SignalType,Entity,Memory,Bundle - Built-ins:
read,write,place,any,all - Comments:
#and//line comments - Strings: Double-quoted with escape sequences
- Numbers: Integers (decimal, hex, binary, octal)
- Operators: All arithmetic, comparison, logical, and projection operators
- Function highlighting: Definitions and calls
- Property access:
object.propertysyntax
.facto(primary)
To modify the highlighting:
- Edit
syntaxes/facto.tmLanguage.jsonto change token patterns - Edit
language-configuration.jsonfor bracket matching, auto-indent, etc.
Open examples/demo.facto to see the highlighting in action.